Sha256: 90ea0ace75a2b40dfc812503c24046ecc185557d3657f68ddc5cbe292d1ac5d1

Contents?: true

Size: 1.29 KB

Versions: 3

Compression:

Stored size: 1.29 KB

Contents

require 'devise'

require 'action_controller'
require 'action_controller/base'
require 'devise_masquerade/version'
require 'devise_masquerade/routes'
require 'devise_masquerade/controllers/helpers'
require 'devise_masquerade/controllers/url_helpers'
require 'devise_masquerade/rails'

module DeviseMasquerade
end

module Devise
  mattr_accessor :masquerade_param
  @@masquerade_param = 'masquerade'

  mattr_accessor :masquerade_expires_in
  @@masquerade_expires_in = 10.seconds

  mattr_accessor :masquerade_key_size
  @@masquerade_key_size = 16

  mattr_accessor :masquerade_bypass_warden_callback
  @@masquerade_bypass_warden_callback = false

  mattr_accessor :masquerade_routes_back
  @@masquerade_routes_back = false

  # Example: Devise.masqueraded_resource_class = User
  mattr_accessor :masqueraded_resource_class

  # Example: Devise.masqueraded_resource_name = :user
  mattr_accessor :masqueraded_resource_name

  # Example: Devise.masquerading_resource_class = AdminUser
  mattr_accessor :masquerading_resource_class

  # Example: Devise.masquerading_resource_name = :admin_user
  mattr_accessor :masquerading_resource_name

  @@helpers << DeviseMasquerade::Controllers::Helpers
end

Devise.add_module :masqueradable, :controller => :masquerades,
  :model => 'devise_masquerade/model', :route => :masquerade

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise_masquerade-0.6.5 lib/devise_masquerade.rb
devise_masquerade-0.6.4 lib/devise_masquerade.rb
devise_masquerade-0.6.3 lib/devise_masquerade.rb