Actually, In the book it has "&@user.tasks..."; http://screencast.com/t/YzE3NTVkY
On Sep 20, 4:48 pm, kevinpfromnm <[email protected]> wrote: > take out &user so with="tasks.group_by..." > > if you use &user, it's looking for a variable or method called user. > you likely want the current context (since it's a user show page) > which you can skip the & if you just want to call a method on the > current context. > > On Sep 20, 12:52 pm, Fernando Val <[email protected]> wrote: > > > > > Hi guys, > > > I'm learning Hobo with the fantastic book "Rapid Rails with Hobo" > > In Tut. 17 I put de code like in the picture: > > > My model user.rb, I think, they must be the line: > > has_many :tasks, :dependent => :destroy > > > And in the tuto, this not appear. > > > In..views/users/show.dryml > > > <show-page> > > <content-body:> > > <h3><Your/> Assigned Tasks</h3> > > <repeat with="&user.tasks.group_by(&:requirement)"> > > <h4>Requirement: <a with="&this_key"/></h4> > > <collection/> > > </repeat> > > </content-body:> > > </show-page> > > > An I get this error: > > NoMethodError in Users#show > > > Showing *app/views/users/show.dryml* where line *#7* raised: > > > undefined method `user' for #<ActionView::Base:0x54ae5c0> > > > Extracted source (around line *#7*): > > > Is there any typo in the code? or the problem is in the model? > > > I tried this last and don't works. Raise the same error. > > > Thanks. > > > -- > > Fernando Val > > Web Designerhttp://www.fernandoval.es -- 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.
