switch_user 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -3,6 +3,8 @@ switch_user
3
3
 
4
4
  Inspired from hobo, switch_user provides a convenient way to switch current user that speed up your development.
5
5
 
6
+ switch_user promises that it only be activated in the development environment.
7
+
6
8
  It supports only devise now, but it will support authlogic in the future.
7
9
 
8
10
  Install
@@ -1,9 +1,9 @@
1
1
  module SwitchUserHelper
2
2
  def switch_user_select
3
3
  if Rails.env == "development"
4
- if @current_user
4
+ if current_user
5
5
  options = "<option value="">Guest</option>"
6
- options += options_from_collection_for_select(User.all, :id, :email, @current_user.id)
6
+ options += options_from_collection_for_select(User.all, :id, :email, current_user.id)
7
7
  else
8
8
  options = "<option selected='selected' value="">Guest</option>"
9
9
  options += options_from_collection_for_select(User.all, :id, :email)
@@ -1,3 +1,3 @@
1
1
  module SwitchUser
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Richard Huang