I have an Application controller. It consists of a single index action. Now I want to add a new action called "buy":
def buy respond_to do |format| format.html end end
I added buy.html.erb to the views, but when I view / apps / buy, I get the following message:
Unknown action - The action 'show' could not be found for AppsController
in routes I added this:
match '/apps/buy', :controller => 'apps', :action => 'buy'
early!
ruby-on-rails controller action routes
Tronic
source share