Always I’m getting the error as : ArgumentError: arguments passed to
url_for can’t be handled. Please require routes or provide your own
implementation
Any idea what am I doing wrong ? I am not getting the result as guide
promised.
–
Regards,
Arup R.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
On Wednesday, February 18, 2015 11:27:47 PM tamouse pontiki wrote:
If I call link_to with helper like you are from rails console (running
pry-rails), I get the same error. But when I put it into a view, it
works…
Thanks. Then I’ll create an issue ticket for this.
–
Regards,
Arup R.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
Always I’m getting the error as : ArgumentError: arguments passed to
url_for can’t be handled. Please require routes or provide your own
implementation
Any idea what am I doing wrong ? I am not getting the result as guide
promised.
Why do you prefix link_to with 'helper ? To point to a comments#show, just
use
link_to 'Show comment", Comment.first
or
link_to 'Show comment", comment
if you have a *comment *instance variable defined in ‘show’ action of
the
CommentsController.
Your Comment is a RESTful resource and have all the standard RESTful
methods defined by default according to your routes. So, no need to
precise
the GET in your link_to helper in the view.
On Friday, February 20, 2015 12:06:34 AM Javix wrote:
comments#create
Now, I am trying to figure out what I read from the guide -
helper.link_to(“Show comment”, [Comment.first], method: :get)
CommentsController.
Your Comment is a RESTful resource and have all the standard RESTful
methods defined by default according to your routes. So, no need to precise
the GET in your link_to helper in the view.
My point was in rails console, not inside the erb template.
–
Regards,
Arup R.
Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are, by
definition, not smart enough to debug it.
–Brian Kernighan
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.