Module: ActiveRecord::Tablefree::ActsMethods
- Defined in:
- lib/activerecord-tablefree.rb
Overview
:nodoc:
Instance Method Summary collapse
-
#has_no_table(options = {:database => :fail_fast}) ⇒ Object
A model that needs to be tablefree will call this method to indicate it.
- #tablefree? ⇒ Boolean
Instance Method Details
#has_no_table(options = {:database => :fail_fast}) ⇒ Object
A model that needs to be tablefree will call this method to indicate it.
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/activerecord-tablefree.rb', line 45 def has_no_table( = {:database => :fail_fast}) raise ArgumentError.new("Invalid database option '#{[:database]}'") unless [:fail_fast, :pretend_success].member? [:database] # keep our options handy class_attribute :tablefree_options self. = { :database => [:database], :columns_hash => {} } # extend extend ActiveRecord::Tablefree::SingletonMethods extend ActiveRecord::Tablefree::ClassMethods # include include ActiveRecord::Tablefree::InstanceMethods # setup columns include ActiveModel::AttributeAssignment include ActiveRecord::ModelSchema end |
#tablefree? ⇒ Boolean
66 67 68 |
# File 'lib/activerecord-tablefree.rb', line 66 def tablefree? false end |