Skip to content

Commit

Permalink
Merge pull request binarylogic#290 from brianviveiros/master
Browse files Browse the repository at this point in the history
Raise an exception if database connection is not established before using acts_as_authentic
  • Loading branch information
binarylogic committed Jan 6, 2012
2 parents d52ea3b + ed6d8f3 commit 309187b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/authlogic/acts_as_authentic/base.rb
Expand Up @@ -28,7 +28,7 @@ module Config
# See the various sub modules for the configuration they provide.
def acts_as_authentic(unsupported_options = nil, &block)
# Stop all configuration if the DB is not set up
return if !db_setup?
raise StandardError.new("You must establish a database connection before using acts_as_authentic") if !db_setup?

raise ArgumentError.new("You are using the old v1.X.X configuration method for Authlogic. Instead of " +
"passing a hash of configuration options to acts_as_authentic, pass a block: acts_as_authentic { |c| c.my_option = my_value }") if !unsupported_options.nil?
Expand Down

0 comments on commit 309187b

Please sign in to comment.