开发者

Rails 3 - Made a new controller action and view but cant route it

I'm using Rails 3

I have a controller called subscriber_controller.rb

I just added an action called "def houston" and added this to my routes file

 match '/houston' => 'subscriber#houston'
 get "subscriber/houston"

but whenever I try to go to "http://localhost:3000/houston" which was the goal i get the error

Routing Error No route matches "/houston"

What else do I need to add to the rout开发者_运维问答es file to find the correct action in the controller and have the url work as http://localhost:3000/houston ?


What does "rake routes" give you?

I tried the same thing and it worked.

Check that you saved your routes file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜