2013-08-30 49 views
1

我在app/controllers/devise/member_registration_controller.rb定製控制器,看起來像這樣:定製設計視圖應該去哪裏?

class Devise::MemberRegistrationController < Devise::RegistrationsController 

    def create 
    .... 
    end 

end 

我把我的自定義設計的觀點:

app/views/devise/member_registration/ 

config.scoped_views = true 

在我devise.rb文件我的我的routes.rb有:

devise_for :members, :controllers => { 
    :registrations => 'devise/members_registration' 
} 

但我仍然看到此服務器日誌,當我查看該頁面:

Rendered /Users/gerry/.rvm/gems/[email protected]_rails_4_0/gems/devise-3.0.3/app/views/devise/registrations/edit.html.erb within layouts/application 

我缺少的東西?我使用Rails 4,並制定3.0.3

+0

你嘗試'rails g devise:views'和checck所有的視圖都被創建或不創建? –

+0

'devise_for:members,:controllers => { :registrations => members_registration' }''和views/members_registration/edit.html.erb' –

回答

0

對於自己的控制器的視圖,你可以試試下面一個

devise_for :members, :controllers => { :registrations => members_registration' } 

views/members_registration/edit.html.erb 

在控制器

class MemberRegistrationController < Devise::RegistrationsController 
    ... 
end