Sure for my first question I made some changes to my routes file here I use resources for my model which generated the routes and then I write this code in link : This is what I change in route :
resources :feed_likes, param: :feed_id and this is my links which I am passing the params : it is for dislike : <%= link_to "Dislike", feed_like_path(:feed_id => @feed, :user_id => current_user.id ), :confirm => 'Are you sure?',:remote => true, :method => :delete,data: { disable_with: "Processsing..." }, class: "btn btn-primary" %> and this is for like : <%= link_to "like", feed_likes_path(:feed_id => @feed, :user_id => current_user.id ), :confirm => 'Are you sure?',:remote => true, :method => :post, data: { disable_with: "Processsing..." }, class: "btn btn-primary" %> And for delaying the process I use disable_with It served my purpose On Sun, Aug 16, 2015 at 10:16 AM, Elizabeth McGurty <emcgur...@gmail.com> wrote: > Would you kindly share your results? > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Ruby on Rails: Talk" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/rubyonrails-talk/UQznBN9IU_s/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > rubyonrails-talk+unsubscr...@googlegroups.com. > To post to this group, send email to rubyonrails-talk@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/rubyonrails-talk/ce36e9d2-245b-47e5-95c0-443944b489f8%40googlegroups.com. > > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAPGhMx4xhqdgqZ-PnDuh%2Bh-jKAOQoVWCGq_JDDi46zdEZr9JoQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.