Permalink
Browse files

Added second parameter for add_acts_as_authentic module to specify th…

…e position: append or prepend.
  • Loading branch information...
1 parent 6b2532a commit b2a8b90dcea4a33f8a47b7203c51bfee3dcda55a @binarylogic binarylogic committed Mar 30, 2009
Showing with 11 additions and 4 deletions.
  1. +2 −1 CHANGELOG.rdoc
  2. +1 −0 Manifest.txt
  3. +7 −2 lib/authlogic/acts_as_authentic/base.rb
  4. +1 −1 lib/authlogic/version.rb
View
@@ -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
@@ -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
@@ -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
@@ -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)

0 comments on commit b2a8b90

Please sign in to comment.