DEV Community

Discussion on: Adding a Basic Search Form in Rails

Collapse
 
linuxander profile image
Linuxander

This is pretty old, but maybe for someone else:

Fish belongs to Sushi, so that's where :sushi_id come from. There's also controller and model for Sushi, with :id field, and that field is used as identifier in Fish controller.

Sushi would have a fields like: :id, :type..., with has_many :fishes