README.md in devise_masquerade-0.2.0 vs README.md in devise_masquerade-0.3.0

- old
+ new

@@ -36,11 +36,11 @@ devise :invitable, :confirmable, :database_authenticatable, :registerable, :masqueradable Add into your application_controller.rb: - before_filter :masquerade_user! + before_action :masquerade_user! Instead of user you can use your resource name admin, student or another names. If you want to back to the owner of masquerade action user you could use helpers: @@ -72,11 +72,17 @@ def after_masquerade_path_for(resource) "/custom_url" end end + +#### Dont forget to update your Devise routes to point at your Custom Authorization Controller +in `routes.rb`: + devise_for :users, controllers: { masquerades: "admin/masquerades" } + + ## You can redefine few options: Devise.masquerade_param = 'masquerade' Devise.masquerade_expires_in = 10.seconds Devise.masquerade_key_size = 16 # size of the generate by SecureRandom.urlsafe_base64 @@ -92,10 +98,10 @@ 'password' ## Test project cd spec/dummy - rake db:setup db:test:prepare + RAILS_ENV=test rake db:setup cd - rspec ## Contributing