I just found I had to add the :accessible => true option to the has_many :through, not to the has_many.
This takes care of the field that's not generated. And now that I have that, I managed to find how to default my collection-input to check-many: <def tag="collection-input" for="Tag"> <check-many/> </def> Hehe, always happens after I post the message. Like many others. And to think I had the post all written and ready to go for 30 minutes, while I feverishly searched for an answer... Hope it at least helps someone else later! François On 13 sep, 22:39, François Beausoleil <[email protected]> wrote: > Hi! > > I have this: > > class Tag < AR::B > end > > class Person < AR::B > has_many :taggings > has_many :tags, :through => :taggings > end > > class Tagging < AR::B > belongs_to :tag > belongs_to :person > end > > When I render my form and I put taggings in my field-list's fields > attribute, I get an <input-many/>. This isn't what I want. I found the > docs for <collection-input/>, which led me to believe I should use > tags in my fields. When I put tags, the field is entirely skipped: no > HTML is generated, although translation for the field kicks in. > > When I use taggings, I can override the <input-many/> to use a <check- > many/>, but then one of my tag is duplicated, which leads me to > believe I should really be using the final target of my association - > Tag in this case. Also, the models above are simple, but I really have > an STI, and I want to DRY my forms - specifying the <check-many/> case > once would help a lot. > > Are there examples of defaulting to using a <check-many/>? I cloned > the agility tutorial, but couldn't find anything remotely similar. > Googling around for check-many, collection-input and select-many all > point to Hobo's docs, not usages of such. > > That was my > query:http://www.google.ca/search?hl=fr&client=safari&rls=en&q=how+to+defau... > > Thanks! > François -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. 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.
