Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Rails 3 compatibility #185

Closed
wants to merge 4 commits into from

4 participants

@kuldarkrabbi

I found these two small bugs with Rails 3.1.0.beta

Kuldar Krabbi and others added some commits
@lichtamberg

This breaks rails 2 compability

Kuldar Krabbi and others added some commits
@lichtamberg

This breaks rails 2 compability too

@jjb
jjb commented

hi-- i'm going to try to maintain the One True Rails 3 Fork :) please send your pull request to https://github.com/jjb/authlogic

@ghost

This has been pulled in from alternate pull request. Thanks.

@ghost ghost closed this
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 29, 2010
  1. Rails 3 compatibility changes

    Kuldar Krabbi authored
  2. @josei @kuldarkrabbi

    Changed init to fit Rails3

    josei authored kuldarkrabbi committed
  3. Rails 3 compatibility

    Kuldar Krabbi authored
  4. @kuldarkrabbi
This page is out of date. Refresh to see the latest.
View
1  authlogic.gemspec
@@ -85,7 +85,6 @@ Gem::Specification.new do |s|
"lib/authlogic/test_case/mock_logger.rb",
"lib/authlogic/test_case/mock_request.rb",
"lib/authlogic/test_case/rails_request_adapter.rb",
- "rails/init.rb",
"shoulda_macros/authlogic.rb",
"test/acts_as_authentic_test/base_test.rb",
"test/acts_as_authentic_test/email_test.rb",
View
2  init.rb
@@ -1 +1 @@
-require File.dirname(__FILE__) + "/rails/init.rb"
+require File.dirname(__FILE__) + "/lib/authlogic"
View
6 lib/authlogic/acts_as_authentic/logged_in_status.rb
@@ -32,8 +32,8 @@ def self.included(klass)
klass.class_eval do
include InstanceMethods
- named_scope :logged_in, lambda { {:conditions => ["last_request_at > ?", logged_in_timeout.seconds.ago]} }
- named_scope :logged_out, lambda { {:conditions => ["last_request_at is NULL or last_request_at <= ?", logged_in_timeout.seconds.ago]} }
+ scope :logged_in, lambda { {:conditions => ["last_request_at > ?", logged_in_timeout.seconds.ago]} }
+ scope :logged_out, lambda { {:conditions => ["last_request_at is NULL or last_request_at <= ?", logged_in_timeout.seconds.ago]} }
end
end
@@ -57,4 +57,4 @@ def logged_in_timeout
end
end
end
-end
+end
View
4 lib/authlogic/acts_as_authentic/password.rb
@@ -277,7 +277,7 @@ def reset_password
# Resets the password to a random friendly token and then saves the record.
def reset_password!
reset_password
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
alias_method :randomize_password!, :reset_password!
@@ -352,4 +352,4 @@ def transition_from_crypto_providers
end
end
end
-end
+end
View
2  lib/authlogic/acts_as_authentic/perishable_token.rb
@@ -91,7 +91,7 @@ def reset_perishable_token
# Same as reset_perishable_token, but then saves the record afterwards.
def reset_perishable_token!
reset_perishable_token
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
# A convenience method based on the disable_perishable_token_maintenance configuration option.
View
4 lib/authlogic/acts_as_authentic/persistence_token.rb
@@ -53,7 +53,7 @@ def reset_persistence_token
# Same as reset_persistence_token, but then saves the record.
def reset_persistence_token!
reset_persistence_token
- save_without_session_maintenance(false)
+ save_without_session_maintenance(:validate => false)
end
alias_method :forget!, :reset_persistence_token!
@@ -65,4 +65,4 @@ def reset_persistence_token?
end
end
end
-end
+end
View
4 lib/authlogic/session/callbacks.rb
@@ -92,8 +92,8 @@ def persist
def save_record(alternate_record = nil)
r = alternate_record || record
- r.save_without_session_maintenance(false) if r && r.changed? && !r.readonly?
+ r.save_without_session_maintenance(:validate => false) if r && r.changed? && !r.readonly?
end
end
end
-end
+end
View
3  lib/authlogic/session/session.rb
@@ -27,6 +27,7 @@ def session_key(value = nil)
# Instance methods for the session feature.
module InstanceMethods
+ def to_key; nil; end
private
# Tries to validate the session from information in the session
def persist_by_session
@@ -59,4 +60,4 @@ def update_session
end
end
end
-end
+end
View
1  rails/init.rb
@@ -1 +0,0 @@
-require "authlogic"
Something went wrong with that request. Please try again.