switch_user 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/switch_user.rb CHANGED
@@ -25,9 +25,9 @@ module SwitchUser
25
25
  self.display_field = :email
26
26
 
27
27
  mattr_accessor :controller_guard
28
- self.controller_guard = lambda { Rails.env == "development" }
28
+ self.controller_guard = lambda { |current_user, request| Rails.env == "development" }
29
29
  mattr_accessor :view_guard
30
- self.view_guard = lambda { Rails.env == "development" }
30
+ self.view_guard = lambda { |current_user, request| Rails.env == "development" }
31
31
 
32
32
  mattr_accessor :redirect_path
33
33
  self.redirect_path = lambda { |request, params| request.env["HTTP_REFERER"] ? :back : root_path }
@@ -1,3 +1,3 @@
1
1
  module SwitchUser
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switch_user
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Huang
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-10 00:00:00 +08:00
18
+ date: 2010-11-11 00:00:00 +08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency