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

Defined in:
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


48
49
50
51
52
53
# File 'lib/rom/plugins/schema/timestamps.rb', line 48

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

  self
end