Class: ActiveRecord::ConnectionAdapters::TableDefinition
- Defined in:
- lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/schema_definitions.rb
Instance Method Summary collapse
Instance Method Details
#timestamps(*args) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/six-updater-web/vendor/plugins/active_scaffold/lib/extensions/schema_definitions.rb', line 4 def (*args) = args. lock_version = .delete(:lock_version).nil? deleted_at = .delete(:deleted_at).nil? column(:created_at, :datetime, ) column(:deleted_at, :datetime, ) unless deleted_at column(:updated_at, :datetime, ) column(:lock_version, :integer, {:null => false, :default => 0}) if lock_version end |