Hi all.
I have a problem with collection_select, hope you guys can help me.
User has one Address, and Address has one Province. Here are my
models :
models/user.rb
class User < ActiveRecord::Base
has_one :address, :dependent => :destroy
...
models/address.rb
class Address < ActiveRecord::Base
has_one :province
belongs_to :user
...
models/province.rb
class Province < ActiveRecord::Base
belongs_to :country, :address
...
I need to populate a select tag contains list of all provinces. How
can I do that? I''ve tried use collection_select but isn''t
working.
Thank you.
--William
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---