Re: [Rails] More than one button with custom actions inside new.html.erb

26 views
Skip to first unread message

Colin Law

unread,
Apr 30, 2015, 3:22:00 AM4/30/15
to rubyonra...@googlegroups.com
On 30 April 2015 at 01:03, Padmahas Bn <padm...@gmail.com> wrote:
> ...
> But the second button is not working but throwing an error message
>
> No route matches {:action=>"deduction", :class=>"btn btn-primary",
> :controller=>"recoveries", :method=>"post"}
>
> Now how can I call custom action "deduction" written inside Somenames
> controller so that it will call instance method "methodsecond"

You indicated in a previous message that you had worked right through
railstutorial.org. Perhaps you missed the sections where it used
routes.rb to setup routes to control which action is called for each
request. Have a look at the rails guide on routing to see the various
options for how to do this. Also look at the other guides, they
contain a lot of useful information.

As a matter of interest, why have you posted this request for help
twice? One is quite sufficient and it is best to use plain text mode
(as you have done here).

Colin

Padmahas Bn

unread,
May 4, 2015, 10:35:52 AM5/4/15
to rubyonra...@googlegroups.com
>Perhaps you missed the sections where it used
>routes.rb to setup routes to control which action is called for each
>reques

 I haven't missed, Since I was digging deep into model from past two weeks, I almost forgot there is an essential routing file between V and C among MVC. Thank you for the hint.

>As a matter of interest, why have you posted this request for help
>twice?  One is quite sufficient and it is best to use plain text mode
>(as you have done here).

I wasn't intend to post two messages, Since I can't edit the post posted in group, And when I saw my post back again I myself didn't like the long question with no clue of which is the code and what is my query. So I deleted the old one and posted the new one.

--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLunV0%2BiZSjCMztYvq2w1O3fd_N9rDCQb4F8%3D%3DhQwpogSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Colin Law

unread,
May 4, 2015, 10:44:04 AM5/4/15
to rubyonra...@googlegroups.com
On 4 May 2015 at 15:35, Padmahas Bn <padm...@gmail.com> wrote:
>> ..
> I wasn't intend to post two messages, Since I can't edit the post posted in
> group, And when I saw my post back again I myself didn't like the long
> question with no clue of which is the code and what is my query. So I
> deleted the old one and posted the new one.

You can't delete posts, this is a mailing list not a forum (though you
may be accessing it via a forum like interface). Once I received your
original post there is no way for you to delete it from my PC. In
such circumstances the best thing to do is just to post a follow up
message.

Cheers

Colin

Padmahas Bn

unread,
May 4, 2015, 10:55:08 AM5/4/15
to rubyonra...@googlegroups.com
You can't delete posts, this is a mailing list not a forum (though you
may be accessing it via a forum like interface).  Once I received your
original post there is no way for you to delete it from my PC.  In
such circumstances the best thing to do is just to post a follow up
message.
Cheers

Pretty new for mailing list type discussion. From next time I will keep this in mind . And sorry all for violating mailing list rules.

--
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-ta...@googlegroups.com.
To post to this group, send email to rubyonra...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages