Class: ActiveRecord::Schema

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/schema.rb

Overview

:nodoc:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.define(hash, &block) ⇒ Object



5
6
7
# File 'lib/active_record/schema.rb', line 5

def self.define(hash, &block)
  self.new.instance_eval(&block)
end

Instance Method Details

#create_table(name, options) {|BehaviorAppender.new(name.singularize.camelize.constantize)| ... } ⇒ Object

Yields:



9
10
11
# File 'lib/active_record/schema.rb', line 9

def create_table(name, options)
  yield BehaviorAppender.new(name.singularize.camelize.constantize) unless name == "sessions" || !block_given?
end