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.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/activerecord/tablefree.rb', line 48 def has_no_table( = { database: :fail_fast }) raise ArgumentError, "Invalid database option '#{[:database]}'" unless %i[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
69 70 71 |
# File 'lib/activerecord/tablefree.rb', line 69 def tablefree? false end |