module Traits::Attribute::Naming

Public Instance Methods

name() click to toggle source
# File lib/traits/attribute/naming.rb, line 7
def name
  @name ||= column_definition.name.to_sym
end
quoted_name() click to toggle source
# File lib/traits/attribute/naming.rb, line 11
def quoted_name
  @quoted_name ||= active_record.connection.quote_column_name(name)
end
to_hash() click to toggle source
Calls superclass method
# File lib/traits/attribute/naming.rb, line 15
def to_hash
  super.merge!(
    name:        name,
    quoted_name: quoted_name
  )
end