Owners has_one :widget and Widgets belongs_to :owner. When creating a
new widget, I’m giving the option for the user to specify the owner by
using a drop down select. The select is populated by pulling a list of
What would be the best way to populate the select with owners who do not
have a widget?
I’m assuming my controller would look something like this for Widgets:
@widget = Widget.new
@widgets = Widget.find(:all)
@owners = Owners.find(:all, :conditions => ‘…this is where I go
I’m assuming that it has to go in some kind of condition. Am I supposed
to run the owners find through some sort of block to validate for each
widget I’ve found in @widgets?
Thanks as always for any help in advance.