Announcement (2017-05-07): www.ruby-forum.com is now read-only since I
unfortunately do not have the time to support and maintain the forum any
more. Please see rubyonrails.org/community and ruby-lang.org/en/community
for other Rails- und Ruby-related community platforms.

I have two databases Tours and Bands such that:
- - begin code - -
class Band < ActiveRecord::Base
belongs_to :tours
end
class Tour < ActiveRecord::Base
has_one :bands
end
- - end code - -
In my admin_tours I have added a bit of code that gives me a drop down
menu with a selection of all bands in Bands:
- - begin code - -
<p><label for="band_id">Band</label><br>
<%= select("band", "band_id", Band.find_all.collect {|p| [ p.name,
p.id ] }) %>
- - end code - -
Of course you imagine that I am looking to have band_id save when i save
tours. I am having a difficult time figuring out what code works I
should put in my 'admin_tours_controller'. As I have scaffolded this out
so I am assuming I should be adding some sort of save code to 'update'
and 'create'.
I am willing to pay someone to walk me thru this (aim? tele?) or if you
have any quick (free) advice that would work too.
: )
thanks!
-----------------------
Mason K.
-----------------------
http://www.poccuo.com
-----------------------