Allow overwriting find for authentication method.

This commit is contained in:
Carlos Antonio da Silva
2009-11-19 13:53:57 -02:00
parent ab81bc344f
commit 6829619330
5 changed files with 35 additions and 10 deletions

View File

@@ -15,12 +15,12 @@ ActiveRecord::Base.logger = Logger.new(nil)
ActiveRecord::Base.establish_connection(:adapter => "sqlite3", :database => ":memory:")
ActiveRecord::Schema.define(:version => 1) do
[:users, :admins].each do |table|
[:users, :admins, :accounts].each do |table|
create_table table do |t|
t.authenticatable :null => table == :admins
t.string :username if table == :users
if table == :users
if table != :admin
t.string :username
t.confirmable
t.recoverable
t.rememberable