authentasaurus 0.4.6 → 0.4.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -28,6 +28,19 @@ en:
28
28
  recovery_field_blank: "{{field}} can't be blank"
29
29
  user_invitations:
30
30
  invalid_invitation_token: Invalid invitation token
31
+ areas:
32
+ create_failed: Couldn't create area
33
+ update_failed: Couldn't update area
34
+ groups:
35
+ create_failed: Couldn't create groups
36
+ update_failed: Couldn't update groups
37
+ permissions:
38
+ create_failed: Couldn't create permissions
39
+ update_failed: Couldn't update permissions
40
+ users:
41
+ create_failed: Couldn't create users
42
+ update_failed: Couldn't update users
43
+
31
44
  views:
32
45
  sessions:
33
46
  resend_validation_email_link: Haven't recieved your validation email?
@@ -177,7 +177,7 @@ module ActionController::Authorization
177
177
  unless(skip_request)
178
178
  session[:original_url]=request.url
179
179
  end
180
- flash[:notice] = t(:login_required, :scope => [:authentasaurus, :action_controller, :errors, :messages])
180
+ flash.now[:alert] = t(:login_required, :scope => [:authentasaurus, :action_controller, :errors, :messages])
181
181
  redirect_to new_session_path
182
182
  end
183
183
 
@@ -89,7 +89,7 @@ module ActionView::Authorization
89
89
  unless(skip_request)
90
90
  session[:original_url]=request.url
91
91
  end
92
- flash[:notice] = t(:login_required, :scope => [:authentasaurus, :action_controller, :errors, :messages])
92
+ flash.now[:alert] = t(:login_required, :scope => [:authentasaurus, :action_controller, :errors, :messages])
93
93
  redirect_to new_session_path
94
94
  end
95
95
 
@@ -31,7 +31,7 @@ class Authentasaurus::AreasController < Authentasaurus::AuthentasaurusController
31
31
  if @area.save
32
32
  format.html { redirect_to :action=>:index, :notice => "Area Created" }
33
33
  else
34
- flash[:alert] = "Error creating area"
34
+ flash.now[:alert] = I18n.t(:create_failed, :scope => [:authentasaurus, :messages, :areas])
35
35
  format.html { render :new }
36
36
  end
37
37
  end
@@ -52,7 +52,7 @@ class Authentasaurus::AreasController < Authentasaurus::AuthentasaurusController
52
52
  if @area.update_attributes(params[:area])
53
53
  format.html { redirect_to @area, :notice => "Area updated" }
54
54
  else
55
- flash[:alert] = "Error updating area"
55
+ flash.now[:alert] = I18n.t(:update_failed, :scope => [:authentasaurus, :messages, :areas])
56
56
  format.html { render :edit }
57
57
  end
58
58
  end
@@ -31,7 +31,7 @@ class Authentasaurus::GroupsController < Authentasaurus::AuthentasaurusControlle
31
31
  if @group.save
32
32
  format.html { redirect_to :action=>:index, :notice => "Group created" }
33
33
  else
34
- flash.[:alert] = "Error creating group"
34
+ flash.now[:alert] = I18n.t(:create_failed, :scope => [:authentasaurus, :messages, :groups])
35
35
  format.html { render :new }
36
36
  end
37
37
  end
@@ -52,7 +52,7 @@ class Authentasaurus::GroupsController < Authentasaurus::AuthentasaurusControlle
52
52
  if @group.update_attributes(params[:group])
53
53
  format.html { redirect_to @group, :notice => "Group updated" }
54
54
  else
55
- flash.[:alert] = "Error updating group"
55
+ flash.now[:alert] = I18n.t(:update_failed, :scope => [:authentasaurus, :messages, :groups])
56
56
  format.html { render :edit }
57
57
  end
58
58
  end
@@ -31,7 +31,7 @@ class Authentasaurus::PermissionsController < Authentasaurus::AuthentasaurusCont
31
31
  if @permission.save
32
32
  format.html { redirect_to :action=>:index, :notice => "Permission created" }
33
33
  else
34
- flash[:alert] = "Error creating permission"
34
+ flash.now[:alert] = I18n.t(:create_failed, :scope => [:authentasaurus, :messages, :permissions])
35
35
  format.html { render :new }
36
36
  end
37
37
  end
@@ -53,7 +53,7 @@ class Authentasaurus::PermissionsController < Authentasaurus::AuthentasaurusCont
53
53
  flash.now[:notice] = "Permission updated"
54
54
  format.html { redirect_to @permission }
55
55
  else
56
- flash.now[:notice] = "Error updating permission"
56
+ flash.now[:alert] = I18n.t(:update_failed, :scope => [:authentasaurus, :messages, :permissions])
57
57
  format.html { render :edit }
58
58
  end
59
59
  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.now[:alert] = t(:recovery_failed, :scope => [:authentasaurus, :messages, :recoveries], :email => params[:email])
56
+ format.html { render :edit }
56
57
  end
57
58
  end
58
59
  end
@@ -25,7 +25,7 @@ class Authentasaurus::RegistrationsController < Authentasaurus::AuthentasaurusCo
25
25
  format.html {render :new}
26
26
  end
27
27
  else
28
- flash[:alert] = t(:invalid_invitation_token, :scope => [:authentasaurus, :messages, :user_invitations])
28
+ flash.now[:alert] = t(:invalid_invitation_token, :scope => [:authentasaurus, :messages, :user_invitations])
29
29
  format.html {render :new}
30
30
  end
31
31
  end
@@ -31,7 +31,7 @@ class Authentasaurus::UsersController < Authentasaurus::AuthentasaurusController
31
31
  if @user.save
32
32
  format.html { redirect_to :action=>:index, :notice => "User saved successfully" }
33
33
  else
34
- flash[:alert] = "Error saving user"
34
+ flash.now[:alert] = I18n.t(:create_failed, :scope => [:authentasaurus, :messages, :users])
35
35
  format.html { render :new }
36
36
  end
37
37
  end
@@ -52,7 +52,7 @@ class Authentasaurus::UsersController < Authentasaurus::AuthentasaurusController
52
52
  if @user.update_attributes(params[:user])
53
53
  format.html { redirect_to @user, :notice => "User updated" }
54
54
  else
55
- flash[:alert] = "Error updating user"
55
+ flash.now[:alert] = I18n.t(:update_failed, :scope => [:authentasaurus, :messages, :users])
56
56
  format.html { render :edit }
57
57
  end
58
58
  end
@@ -27,7 +27,7 @@ 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
- flash[:alert] = I18n.t(:validation_email_invalid, :scope => [:authentasaurus, :messages, :validations], :email => params[:email])
30
+ flash.now[:alert] = I18n.t(:validation_email_invalid, :scope => [:authentasaurus, :messages, :validations], :email => params[:email])
31
31
  format.html { render :resend_validation_email }
32
32
  end
33
33
  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: 3
4
+ hash: 1
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 4
9
- - 6
10
- version: 0.4.6
9
+ - 7
10
+ version: 0.4.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Omar Mekky