Module: Traits::Attribute::Naming
- Included in:
- Traits::Attribute
- Defined in:
- lib/traits/concerns/attribute/naming.rb
Instance Method Summary collapse
Instance Method Details
#name ⇒ Object
4 5 6 |
# File 'lib/traits/concerns/attribute/naming.rb', line 4 def name column_definition.name.to_sym end |
#quoted_name ⇒ Object
8 9 10 |
# File 'lib/traits/concerns/attribute/naming.rb', line 8 def quoted_name model_class.connection.quote_column_name(name) end |
#to_hash ⇒ Object
12 13 14 15 16 17 |
# File 'lib/traits/concerns/attribute/naming.rb', line 12 def to_hash super.merge!( name: name, quoted_name: quoted_name ) end |