On Fri, Jul 30, 2010 at 5:44 AM, Nicolas Oury <[email protected]> wrote: > Thank you so much. > I still have a question: > > as I understand it, there is a cleverness is in <do > with="&this.comments.new :owner => current_user"> > By using this.comments.new, you create a comment with the right > commentable_id and commentable_type. > How does this work after that? > On submit, the comment is merged with this new object? > Are there some hidden fields in the form?
I seem to remember the fields are generated, but the comments.new part is mostly to get an object set up that the permissions methods make sense on. Note that .new doesn't actually add a database row, it just creates an in-memory object that could eventually *become* a database row (if you called save on it). --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.
