我在用户控制器中获得了这些操作
class UsersController < ApplicationController
def index #default action
...
end
def new #default action
...
end
def another_new
...
end
def create
...
end
def another_create
...
end
end
Run Code Online (Sandbox Code Playgroud)
我希望能够通过
/users/another_new某种链接:method => :another_create
进行调用/users/another_new
我得到了以下config/routes.rb
get '/users/another_new' :to => 'users#another_new'
resources :users
Run Code Online (Sandbox Code Playgroud)
我的问题是,如果这是添加的正确方法get以及我如何添加another_create方法.