Class: Override
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Override
- Defined in:
- app/models/override.rb
Instance Method Summary collapse
Instance Method Details
#field_name_exists_on_associated_model ⇒ Object
10 11 12 13 14 15 |
# File 'app/models/override.rb', line 10 def field_name_exists_on_associated_model klass = overrideable_type.constantize unless klass.attribute_names.include?(field_name) errors.add(:field_name, "must be an attribute of #{overrideable_type}") end end |