authentasaurus 0.6.7 → 0.6.9

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.
@@ -51,9 +51,8 @@ module ActiveRecord::ActsAsAuthenticatable
51
51
  end
52
52
 
53
53
  module InstanceMethods
54
- def username=(username)
55
- return if username.blank?
56
- self.username = username.downcase
54
+ def username=(username)
55
+ super(username.downcase)
57
56
  end
58
57
 
59
58
  ## Password attribute (used when creating a user)
@@ -52,7 +52,7 @@ module Authentasaurus::Models::Session
52
52
 
53
53
  ret = true
54
54
  session_types.each do |type|
55
- @user = type.to_s.camelize.constantize.authenticate(self.username, self.password, self.remember == "1")
55
+ @user = type.to_s.camelize.constantize.authenticate(self.username.downcase, self.password, self.remember == "1")
56
56
  if @user.nil?
57
57
  self.errors.add_to_base I18n.t(:invalid_login, :scope => [:authentasaurus, :messages, :sessions])
58
58
  ret &= false
@@ -16,7 +16,7 @@ module Authentasaurus::ValidationsController
16
16
  validation.destroy
17
17
  format.html { redirect_to login_url, :notice => I18n.t(:validation_successful, :scope => [:authentasaurus, :messages, :validations])}
18
18
  else
19
- self.alert = I18n.t(:validation_failed, :scope => [:authentasaurus, :messages, :validations])
19
+ flash.now[:alert] = I18n.t(:validation_failed, :scope => [:authentasaurus, :messages, :validations])
20
20
  format.html
21
21
  end
22
22
  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: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 7
10
- version: 0.6.7
9
+ - 9
10
+ version: 0.6.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Omar Mekky
@@ -18,7 +18,7 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-08-18 00:00:00 +02:00
21
+ date: 2010-08-20 00:00:00 +02:00
22
22
  default_executable:
23
23
  dependencies: []
24
24