You can make a custom controller action and set that to the URL for
the update-button.  You will have to set the params on the update-
button.

On Feb 9, 5:44 pm, Vadim Lazuko <[email protected]> wrote:
> Hi Ankur,
>
> yes, I already have a has_many :through - you can see it at initial
> posting.
>
> My question now is how to connect client side: <update-button
> label="Add to favourites" ...> with a User model where I could add an
> action doing similar to what you say "@user.recipe_favourite <<
> params[:recipe]"
>
> ... hmmm, i'm little lost between coding and hobomagic
>
> On 10 фев, 00:17, Ankur <[email protected]> wrote:
>
>
>
>
>
>
>
> > I believe you already have the has_many :through setup.  Are you
> > asking how to add to the user a favorite recipe?  Should be simple:
>
> > Maybe you had a different question?
>
> > On Feb 9, 4:07 pm, Vadim Lazuko <[email protected]> wrote:
>
> > > Hi!
>
> > > Lifecycles does not fit logically being something more like subprocess
> > > of one object while my case is pure many-to-many relationship
>
> > > i see that the only way is to create a controller action for the user
> > > model and pass a recipe as a parameter to handle attach/detach from
> > > the favourites' list
>
> > > can you give me an example of code to deal with 'has_many ... :through
> > > =>...' ?

-- 
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.

Reply via email to