On Apr 27, 10:52 am, Pale Horse <li...@ruby-forum.com> wrote: > > amritpal p. wrote in post #995323: > > > class SayController < ApplicationController > > def hello > > @timee = Time.now > > end > > def goodbye > > > end > > end > > > /app/views/say/hello.html.erb looks like: > > > It is now <%= @timee %> > > <a href="/say/goodbye">Goodbye</a> > > Instead of <a href="/say/goodbye">Goodbye</a>, use <%= link_to > "Goodbye", :action => "goodbye" %> It didn't help,error says No route matches {:controller=>"say", :action=>"goodbye"} > > > /app/views/say/goodbye.html.erb looks like: > > > <h1>Good bye buddy!</h1> > > > When i click on Goodbye link given in hello.html.erb file it says > > "No route matches "/say/goodbye". It made me desperate. I don't > > know why this error persists. > > Have you set up a route for it in config/routes.rb? yes is set up as:
root :to => "say#hello" Thanks -- 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 rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.