Sha256: 9df7e454ca56b126a0a3b5ec0216079fbc15535b1c713c76f493db5cd84ac4aa

Contents?: true

Size: 1.23 KB

Versions: 13

Compression:

Stored size: 1.23 KB

Contents

module Devise
  module Orm
    # This module contains some helpers and handle schema (migrations):
    #
    #   create_table :accounts do |t|
    #     t.database_authenticatable
    #     t.confirmable
    #     t.recoverable
    #     t.rememberable
    #     t.trackable
    #     t.lockable
    #     t.timestamps
    #   end
    #
    # However this method does not add indexes. If you need them, here is the declaration:
    #
    #   add_index "accounts", ["email"],                :name => "email",                :unique => true
    #   add_index "accounts", ["confirmation_token"],   :name => "confirmation_token",   :unique => true
    #   add_index "accounts", ["reset_password_token"], :name => "reset_password_token", :unique => true
    #
    module ActiveRecord
      module Schema
        include Devise::Schema

        # Tell how to apply schema methods.
        def apply_devise_schema(name, type, options={})
          column name, type.to_s.downcase.to_sym, options
        end
      end
    end
  end
end

ActiveRecord::Base.extend Devise::Models
ActiveRecord::ConnectionAdapters::Table.send :include, Devise::Orm::ActiveRecord::Schema
ActiveRecord::ConnectionAdapters::TableDefinition.send :include, Devise::Orm::ActiveRecord::Schema

Version data entries

13 entries across 13 versions & 3 rubygems

Version Path
devise-1.1.9 lib/devise/orm/active_record.rb
devise-1.1.8 lib/devise/orm/active_record.rb
devise-1.1.7 lib/devise/orm/active_record.rb
devise-1.1.6 lib/devise/orm/active_record.rb
devise-1.1.5 lib/devise/orm/active_record.rb
devise-1.1.4 lib/devise/orm/active_record.rb
devise-edge-1.2.rc lib/devise/orm/active_record.rb
devise-1.1.3 lib/devise/orm/active_record.rb
devise-1.1.2 lib/devise/orm/active_record.rb
devise-1.1.1 lib/devise/orm/active_record.rb
devise-1.1.0 lib/devise/orm/active_record.rb
namxam-devise-1.1.0.win lib/devise/orm/active_record.rb
devise-1.1.rc2 lib/devise/orm/active_record.rb