Class: Formatic::Wrappers::AlternativeAttributeName
- Inherits:
-
Object
- Object
- Formatic::Wrappers::AlternativeAttributeName
- Includes:
- Calls
- Defined in:
- lib/formatic/wrappers/alternative_attribute_name.rb
Overview
Checks if an attribute name is from an associated model.
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
11 12 13 14 15 |
# File 'lib/formatic/wrappers/alternative_attribute_name.rb', line 11 def call return unless attribute_name.to_s.end_with?('_id') attribute_name[...-3].to_sym end |