muck-users 3.2.19 → 3.2.20

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.2.19
1
+ 3.2.20
@@ -89,6 +89,7 @@ class Muck::UserSessionsController < ApplicationController
89
89
  format.json { render :json => { :logged_in => false, :message => t('muck.users.login_fail') } }
90
90
  end
91
91
  end
92
+ success
92
93
  end
93
94
 
94
95
  # override redirect by adding a route like this:
@@ -170,6 +170,7 @@ class Muck::UsersController < ApplicationController
170
170
  # Override to act on @user after it is created
171
171
  # success indicates whether or not the user was successfully created
172
172
  def after_create_user(success)
173
+ success
173
174
  end
174
175
 
175
176
  # Override to act on @user before it is updated
@@ -138,13 +138,14 @@ module MuckUsers
138
138
  def any_role?(*test_rolenames)
139
139
  test_rolenames = [test_rolenames] unless test_rolenames.is_a?(Array)
140
140
  test_rolenames.flatten!
141
- @role_names ||= self.roles.map(&:rolename)
141
+ @role_names = self.roles.map(&:rolename) if @role_names.blank?
142
142
  return false if @role_names.blank?
143
143
  (@role_names & test_rolenames).length > 0
144
144
  end
145
145
 
146
146
  # Add the user to a new role
147
147
  def add_to_role(rolename)
148
+ @role_names = nil
148
149
  role = Role.find_or_create_by_rolename(rolename)
149
150
  self.roles << role if !self.roles.include?(role) # Make sure that the user can only be put into a role once
150
151
  end
data/muck-users.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "muck-users"
8
- s.version = "3.2.19"
8
+ s.version = "3.2.20"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Justin Ball", "Joel Duffin"]
12
- s.date = "2011-09-29"
12
+ s.date = "2011-10-07"
13
13
  s.description = "Easily add user signup, login and other features to your application"
14
14
  s.email = "justin@tatemae.com"
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: muck-users
3
3
  version: !ruby/object:Gem::Version
4
- hash: 41
4
+ hash: 39
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
8
  - 2
9
- - 19
10
- version: 3.2.19
9
+ - 20
10
+ version: 3.2.20
11
11
  platform: ruby
12
12
  authors:
13
13
  - Justin Ball
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-09-29 00:00:00 Z
19
+ date: 2011-10-07 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  version_requirements: &id001 !ruby/object:Gem::Requirement