Module: ROM::Plugins::Schema::Timestamps::DSL Private

Defined in:
core/lib/rom/plugins/schema/timestamps.rb

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Instance Method Details

#timestamps(*names) ⇒ Object

Sets non-default timestamp attributes

Examples:

schema do
  use :timestamps
  timestamps :create_on, :updated_on
end


53
54
55
56
57
58
# File 'core/lib/rom/plugins/schema/timestamps.rb', line 53

def timestamps(*names)
  options = plugin_options(:timestamps)
  options[:attributes] = names unless names.empty?

  self
end