Class: ActiveRecord::BaseWithoutTable
- Inherits:
-
Base
- Object
- Base
- ActiveRecord::BaseWithoutTable
- Defined in:
- lib/active_record/base_without_table.rb
Class Method Summary collapse
- .column(name, sql_type = nil, default = nil, null = true) ⇒ Object
- .columns ⇒ Object
-
.reset_column_information ⇒ Object
Reset everything, except the column information.
Instance Method Summary collapse
Class Method Details
.column(name, sql_type = nil, default = nil, null = true) ⇒ Object
14 15 16 17 |
# File 'lib/active_record/base_without_table.rb', line 14 def column(name, sql_type = nil, default = nil, null = true) columns << ActiveRecord::ConnectionAdapters::Column.new(name.to_s, default, sql_type.to_s, null) reset_column_information end |
.columns ⇒ Object
10 11 12 |
# File 'lib/active_record/base_without_table.rb', line 10 def columns() @columns ||= [] end |
.reset_column_information ⇒ Object
Reset everything, except the column information
20 21 22 23 24 |
# File 'lib/active_record/base_without_table.rb', line 20 def reset_column_information columns = @columns super @columns = columns end |
Instance Method Details
#create_or_update_without_callbacks ⇒ Object
5 6 7 |
# File 'lib/active_record/base_without_table.rb', line 5 def create_or_update_without_callbacks errors.empty? end |