On Jun 26, 2011, at 2:20 PM, ylluminate wrote: > Bob, curious, did you ever get this sorted? > http://groups.google.com/group/hobousers/browse_thread/thread/35e85595f8f2086f/baa603cbe427c14e?lnk=gst&q=auto_actions_for#baa603cbe427c14e > > It appears that that post here is slightly connected and I see other > use cases of auto_actions_for, however each time it seems that child > models are being manipulated rather than parents. Is this the case? > Is my problem that you must use auto_actions_for from a controller > that is a child model to a parent that is rendering the input form(s)? > > If so I'm assuming that I need to rethink things here a bit. > > Thanks again guys for any help / enlightenment on this matter.
I'm guessing you've got a many-to-many between Property and PropertyType; the issue, here as in Bob's case, is that auto_actions_for is somewhat specialized for handling a simpler sort of relation. To be precise, here's the case it's intended for: class ParentThing has_many :things end class Thing belongs_to :parent_thing end class ThingsController auto_actions_for :parent_thing, [:index, :new, :create] end As you've both noted, trying this on either side of a has_many :through isn't so good. As to your other question (regarding the selector + new form), you might want to check out Bryan's select-one-or-new-dialog in hobo-jquery; I'm not certain it will do what you've described, but it's certainly a step in the right direction. --Matt Jones -- 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.
