Rails 4.0.0.beta1でdevise
とりあえず、gemが対応されるまでこれで凌ごうかと。
1. Gemfile
gem 'devise', github: 'plataformatec/devise', branch: 'rails4'
2. エラー... orz
`attr_accessible': `attr_accessible` is extracted out of Rails into a gem. Please use new recommended protection model for params(strong_parameters) or add `protected_attributes` to your Gemfile to use old one. (RuntimeError) from /home/leapfrog/projects/kathloc/app/models/user.rb:8:in `<class:User>'
3. config/initializers/devise.rb に以下を追加
DeviseController.class_eval do before_action :resource_params #, only: [:show, :edit, :update, :destroy] def resource_params unless params[resource_name].blank? params.require(resource_name).permit(:email, :password, :password_confirmation, :remember_me, :reset_password_token, :current_password) end end end