Anubhaw Prakash wrote:
> Tony Yin wrote:
>> hi, I'm new to rails, trying to setup a simple site, in my routes.rb I
>> have map.root :controller => 'site' , and in my app/controller I have
>> defined site_controller.rb with action index and about. When I start up
>> the server, I can see my index on localhost:3000 as the default index,
>> but when I try to access localhost:3000/about, it gives my a routing
>> error saying "No route matches "/about" with {:method=>:get}".
>> Please help
>>
>> Thank you
>
>
> Try this,
>
> map.resources :controller_name, :collection => { :method_name => :get }
>
> Thanks,
> Anubhaw
hi Anubhaw, thanks for the reply, but that did not work. When I put that
in
my routes.rb, I lost home index; but I can view index from
localhost:3000/site. But when I try to view localhost:3000/about it
gives me an error message Unknown action
No action responded to show. Actions: about, help, and index
So it appears something is not connecting, even though I specified the
action name and the action is defined in my controller.
--
Posted via http://www.ruby-forum.com/.
--
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.