OK wow. Way off. Sorry!! Clearly delete-button allows ajax attributes just not callbacks. So I can use an update param...
however I'm getting the following error in my log: < NoMethodError (undefined method `sum' for nil:NilClass): < app/views/menus/show.dryml:27:in `foo2_part' < app/views/menus/show.dryml:27:in `foo2_part' which to me suggests I have a problem similiar to before, so I'm customized the hobo_destroy function in the assist controller similiarly to my hobo_update correction I made last time. I'm taking a small leap of faith becuase upon reading through the delete-button source code, there's no mention of the destroy function, just :delete method... and Voila!! It works. :3 Lovin this stuff, HoboHippy On Nov 26, 4:23 pm, hobo_hippy <[email protected]> wrote: > I've looked into your suggestions, and yeah, i could just use a User > has many. In any case I got it working quite nicely and understand the > controller actions a little better. I've got one more question though: > > So now my aside updates the total when the user clicks the createbutton. > sweet. I also have adelete-buttonfor each assist that shows > in the order, but if youdeletean assist, the total doesn'tupdate. > this is obviously becuase there's noting telling the app toupdatethe > part where the total is. My total sits outside of the collection tags > becuase I don't want a total to show up after every item, just once at > the bottom. But FRET!delete-buttondoesn't have anupdateparameter > for the tag. I thought, hey no problem. Just stick thedelete-button > inside a form and passupdate="partWithTheTotal" as a form param. But > this isn't working either... > > thoughts? > > On Nov 5, 7:11 am, hobo_hippy <[email protected]> wrote: > > > > > > > > > I'm still learning the right way to do things. I'm kinda hacking away > > at it till I get it to work well enough. I'll look into what you > > recommended! > > > Thanks, > > HoboHippy > > > On Nov 4, 7:48 am, Matt Jones <[email protected]> wrote: > > > > On Nov 3, 2011, at 10:23 PM, hobo_hippy wrote: > > > > > okay, but what do you mean correctly set the @assists? I thought I was > > > > correctly setting it. > > > > You're setting it in the show action, but the partupdaterenders from the > > > *create* action. Adding: > > > > @assists = OrderAssist.find :all, :conditions => {:user_id => > > > current_user} > > > > to that action should make the nil error go away. > > > > BTW, is there a reason why you're not just declaring User has_many > > > :order_assists and getting them that way? The find :all stuff just looks > > > strange. > > > > --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.
