Nicola Peluchetti
Nicola Peluchetti

Reputation: 76880

How to create a Select which let's you choose between valid types with single table inheritance in Ruby on Rails

i'm using Single Table Inheritance in ruby on rails to model various animals. So i have a base Animal Class and then i have various subclasses in the models/animal folder.

When the user creates an animal, i want to show a select of the various animal types which allows the user to choose a "valid" animal ( which means one animal for which a class exists ).

How can i do this?

Upvotes: 0

Views: 66

Answers (1)

mabako
mabako

Reputation: 1183

Your two choices are

Upvotes: 1

Related Questions