Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added second parameter for add_acts_as_authentic module to specify th…

…e position: append or prepend.
  • Loading branch information...
commit b2a8b90dcea4a33f8a47b7203c51bfee3dcda55a 1 parent 6b2532a
@binarylogic binarylogic authored
View
3  CHANGELOG.rdoc
@@ -1,6 +1,7 @@
-== 2.0.5
+== 2.0.5 released 2009-3-30
* Stub out authenticate_with_http_basic for TestCase::Controller adapter.
+* Added second parameter for add_acts_as_authentic module to specify the position: append or prepend.
== 2.0.4 released 2009-3-28
View
1  Manifest.txt
@@ -58,6 +58,7 @@ lib/authlogic/test_case.rb
lib/authlogic/test_case/controller_adapter.rb
lib/authlogic/test_case/mock_controller.rb
lib/authlogic/test_case/mock_cookie_jar.rb
+lib/authlogic/test_case/mock_logger.rb
lib/authlogic/test_case/mock_request.rb
lib/authlogic/version.rb
shoulda_macros/authlogic.rb
View
9 lib/authlogic/acts_as_authentic/base.rb
@@ -41,9 +41,14 @@ def acts_as_authentic(&block)
# nothing to do with Authlogic.
#
# That being said, this is your tool for extending Authlogic and "hooking" into the acts_as_authentic call.
- def add_acts_as_authentic_module(mod)
+ def add_acts_as_authentic_module(mod, action = :append)
modules = acts_as_authentic_modules
- modules << mod
+ case action
+ when :append
+ modules << mod
+ when :prepend
+ modules = [mod] + modules
+ end
modules.uniq!
write_inheritable_attribute(:acts_as_authentic_modules, modules)
end
View
2  lib/authlogic/version.rb
@@ -41,7 +41,7 @@ def to_a
MAJOR = 2
MINOR = 0
- TINY = 4
+ TINY = 5
# The current version as a Version instance
CURRENT = new(MAJOR, MINOR, TINY)
Please sign in to comment.
Something went wrong with that request. Please try again.