I'm using devise invitable: gem on github
I want to implement controller inheritance, so I added a controller:
class InvitationsController < Devise::InvitationsController
include Devise::Controllers::InternalHelpers
before_filter :authenticate_inviter!, :only => [:new, :create]
before_filter :require_no_authentication, :only => [:edit, :update]
helper_method :after_sign_in_path_for
# GET /resource/invitation/new
def new
build_resource
render_with_scope :new
end
..
.
And updated my routes to:
devise_for :users, :controllers => {:invitations => "invitations"}
But I'm getting an error:
"Template is missing
Missing template invitations/new with {:formats=>[:html], :locale=>[:en, :en], :handlers=>[:rjs, :builder, :rhtml, :erb, :rxml]} in view paths "/Users/bhellman/Sites/cline/app/views", "/Library/Ruby/Gems/1.8/gems/devise_invitable-0.3.5/app/views", "/Library/Ruby/Gems/1.8/gems/devise-1.1.3/app/views""
Can you help me understand what I did wrong with the routes?
据我了解,您已经选择了正确的路线,而错过的是views/invitations/new.html.erb
文件。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.