authentasaurus 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -29,10 +29,9 @@ class Authentasaurus::AreasController < Authentasaurus::AuthentasaurusController
29
29
 
30
30
  respond_to do |format|
31
31
  if @area.save
32
- flash.now[:notice] = "Area created"
33
- format.html { redirect_to :action=>:index }
32
+ format.html { redirect_to :action=>:index, :notice => "Area Created" }
34
33
  else
35
- flash.now[:notice] = "Error creating area"
34
+ flash[:alert] = "Error creating area"
36
35
  format.html { render :new }
37
36
  end
38
37
  end
@@ -51,10 +50,9 @@ class Authentasaurus::AreasController < Authentasaurus::AuthentasaurusController
51
50
 
52
51
  respond_to do |format|
53
52
  if @area.update_attributes(params[:area])
54
- flash.now[:notice] = "Area updated"
55
- format.html { redirect_to @area }
53
+ format.html { redirect_to @area, :notice => "Area updated" }
56
54
  else
57
- flash.now[:notice] = "Error updating area"
55
+ flash[:alert] = "Error updating area"
58
56
  format.html { render :edit }
59
57
  end
60
58
  end
@@ -29,10 +29,9 @@ class Authentasaurus::GroupsController < Authentasaurus::AuthentasaurusControlle
29
29
 
30
30
  respond_to do |format|
31
31
  if @group.save
32
- flash.now[:notice] = "Group created"
33
- format.html { redirect_to :action=>:index }
32
+ format.html { redirect_to :action=>:index, :notice => "Group created" }
34
33
  else
35
- flash.now[:notice] = "Error creating group"
34
+ flash.[:alert] = "Error creating group"
36
35
  format.html { render :new }
37
36
  end
38
37
  end
@@ -51,10 +50,9 @@ class Authentasaurus::GroupsController < Authentasaurus::AuthentasaurusControlle
51
50
 
52
51
  respond_to do |format|
53
52
  if @group.update_attributes(params[:group])
54
- flash.now[:notice] = "Group updated"
55
- format.html { redirect_to @group }
53
+ format.html { redirect_to @group, :notice => "Group updated" }
56
54
  else
57
- flash.now[:notice] = "Error updating group"
55
+ flash.[:alert] = "Error updating group"
58
56
  format.html { render :edit }
59
57
  end
60
58
  end
@@ -29,10 +29,9 @@ class Authentasaurus::PermissionsController < Authentasaurus::AuthentasaurusCont
29
29
 
30
30
  respond_to do |format|
31
31
  if @permission.save
32
- flash.now[:notice] = "Permission created"
33
- format.html { redirect_to :action=>:index }
32
+ format.html { redirect_to :action=>:index, :notice => "Permission created" }
34
33
  else
35
- flash.now[:notice] = "Error creating permission"
34
+ flash[:alert] = "Error creating permission"
36
35
  format.html { render :new }
37
36
  end
38
37
  end
@@ -52,7 +52,8 @@ class Authentasaurus::RecoveriesController < Authentasaurus::AuthentasaurusContr
52
52
  @recovery.destroy
53
53
  format.html { redirect_to new_session_path, :notice => t(:recovery_successful, :scope => [:authentasaurus, :messages, :recoveries], :email => params[:email]) }
54
54
  else
55
- format.html { render :edit, :alert => t(:recovery_failed, :scope => [:authentasaurus, :messages, :recoveries], :email => params[:email]) }
55
+ flash[:alert] = t(:recovery_failed, :scope => [:authentasaurus, :messages, :recoveries]
56
+ format.html { render :edit, :email => params[:email]) }
56
57
  end
57
58
  end
58
59
  end
@@ -25,7 +25,8 @@ class Authentasaurus::RegistrationsController < Authentasaurus::AuthentasaurusCo
25
25
  format.html {render :new}
26
26
  end
27
27
  else
28
- format.html {render :new, :alert => t(:invalid_invitation_token, :scope => [:authentasaurus, :messages, :user_invitations])}
28
+ flash[:alert] = t(:invalid_invitation_token, :scope => [:authentasaurus, :messages, :user_invitations])
29
+ format.html {render :new}
29
30
  end
30
31
  end
31
32
  end
@@ -29,10 +29,9 @@ class Authentasaurus::UsersController < Authentasaurus::AuthentasaurusController
29
29
 
30
30
  respond_to do |format|
31
31
  if @user.save
32
- flash.now[:notice] = "User saved successfully"
33
- format.html { redirect_to :action=>:index }
32
+ format.html { redirect_to :action=>:index, :notice => "User saved successfully" }
34
33
  else
35
- flash.now[:notice] = "Error saving user"
34
+ flash[:alert] = "Error saving user"
36
35
  format.html { render :new }
37
36
  end
38
37
  end
@@ -51,10 +50,9 @@ class Authentasaurus::UsersController < Authentasaurus::AuthentasaurusController
51
50
 
52
51
  respond_to do |format|
53
52
  if @user.update_attributes(params[:user])
54
- flash.now[:notice] = "User updated"
55
- format.html { redirect_to @user }
53
+ format.html { redirect_to @user, :notice => "User updated" }
56
54
  else
57
- flash.now[:notice] = "Error updating user"
55
+ flash[:alert] = "Error updating user"
58
56
  format.html { render :edit }
59
57
  end
60
58
  end
@@ -27,7 +27,8 @@ class Authentasaurus::ValidationsController < Authentasaurus::AuthentasaurusCont
27
27
  validation.send_validation
28
28
  format.html {redirect_to login_url, :notice => I18n.t(:validation_email_sent, :scope => [:authentasaurus, :messages, :validations])}
29
29
  else
30
- format.html {render :resend_validation_email, :alert => I18n.t(:validation_email_invalid, :scope => [:authentasaurus, :messages, :validations], :email => params[:email])}
30
+ flash[:alert] = I18n.t(:validation_email_invalid, :scope => [:authentasaurus, :messages, :validations]
31
+ format.html { render :resend_validation_email, :email => params[:email]) }
31
32
  end
32
33
  end
33
34
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentasaurus
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 3
10
- version: 0.4.3
9
+ - 4
10
+ version: 0.4.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Omar Mekky