On 27 May 2011 09:43, John <[email protected]> wrote:
>
> After reading routing tutorial ,made some changes.Button is created using
> "<%= button_to "New", :action => "click" %>" .When i clicked the button
> error is:
>                No routes matches "/posts/click"
>
>  In router.rb ,i added a route to click action of controller as but error is
> not resolved yet.
>  Check::Application.routes.draw do
>   get "posts/index"
>  resources :posts do
>
>  end
> get 'posts/click'

Once again I have to ask whether the route appears when you do
rake routes
Your first action should be to do that and make sure the route appears
there.  If it does not then experiment with routes.rb until it does
appear in rake routes.

Did you remember to restart the server after editing routes.rb?

Colin

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to