Hi Mike, I don't know if Jeremy found the solution, but it doesn't work because with Rails 3/4 you need to make the relationship "accessible" twice:
has_many :foos, :accessible => true attr_accessible :name, :description, :foos Warm regards, Ignacio PS: Mike, if this doesn't help, please send us a piece of the failing code so we can try to reproduce :). El 07/01/14 03:21, Mike escribió: > Jeremy, > > Did you ever get this to work? I'm wondering what the issue was.... > > Mike > > On Friday, December 21, 2012 11:23:23 AM UTC-5, Jeremy Savoy wrote: > > Sorry for the delayed response. > > Yes, so in my bar model I have ... > > belongs_to :foo_assignment > > Completing the belongs_to/has_many relationship, and utilizing a > backend model foo_assignment so that I can use :through and then be > allowed to use <select-many>. > > This still doesn't work for me in pre7. > > On Tuesday, November 20, 2012 2:59:11 PM UTC-5, Ignacio Huerta wrote: > > Hi Jeremy, > > I'm afraid I didn't understand your DB structure: > > > Each Foo can have many Bars, but each Bar can only belong to > one Foo > > Don't you need here a one-to-many relationship (has_many / > belongs_to) > instead of a many-to-many relationship? > > Regards, > Ignacio > > El 19/11/12 17:47, Jeremy Savoy escribi�: > > Thanks Bryan, forgot that bit -- but still doesn't work. In > fact, in > > application.dryml if I change > > > > <field-list: fields="foo1, foo2, bars"> > > > > to > > > > <field-list: fields="foo1"> > > > > I still get my default fields for Foo -- foo1 and foo2 during > a "new", > > but no bar obviously. > > > > I have not tried this with the other themes, only bootstrap. > > > > On Sunday, November 18, 2012 4:56:55 PM UTC-5, Jeremy Savoy > wrote: > > > > Hi, I'm having trouble getting <select-many> to work in a > new app > > using hobo 2.0.0 pre6 and bootstrap. > > > > in my "foo" model I have ... > > > > has_many :foo_assignments, :dependent => :destroy > > has_many :bars, :through => :foo_assignments > > > > in my "foo_assignment" model I have ... > > > > belongs_to :foo > > belongs_to :bar > > > > and in application.dryml I have ... > > > > <extend tag="form" for="Foo"> > > <old-form merge> > > <field-list: fields="foo1, foo2, bars"> > > <bars-view:> > > <select-many/> > > </bars-view:> > > </field-list:> > > </old-form> > > </extend> > > > > Each Foo can have many Bars, but each Bar can only belong > to one > > Foo, so I haven't put anything relational in my Bars model > -- was > > considerings "has_one" foo_assignments - that didn't make a > > difference for the select-many. > > > > I'm assuming my errors are in application.dryml, but the > code runs > > fine but the select-many never shows up. I'm sure it's > something > > simple, any ideas ? > > > > -- > > You received this message because you are subscribed to the > Google > > Groups "Hobo Users" group. > > To view this discussion on the web visit > > https://groups.google.com/d/msg/hobousers/-/_iskhz6nJ-kJ > <https://groups.google.com/d/msg/hobousers/-/_iskhz6nJ-kJ>. > > To post to this group, send email to [email protected]. > > To unsubscribe from this group, send email to > > [email protected]. > > For more options, visit this group at > > http://groups.google.com/group/hobousers?hl=en > <http://groups.google.com/group/hobousers?hl=en>. > > -- > Ignacio Huerta Arteche > http://www.ihuerta.net > Tel�fono: 0034 645 70 77 35 > Email realizado con software libre > > -- > You received this message because you are subscribed to the Google > Groups "Hobo Users" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/hobousers. > For more options, visit https://groups.google.com/groups/opt_out. -- Ignacio Huerta Arteche http://www.ihuerta.net Teléfono: 0034 645 70 77 35 Email realizado con software libre -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/hobousers. For more options, visit https://groups.google.com/groups/opt_out.
