Module: RailsExtension::ActiveRecordExtension::Errors::InstanceMethods
- Defined in:
- lib/rails_extension/active_record_extension/errors.rb
Instance Method Summary collapse
Instance Method Details
#on_attr_and_type(attribute, type) ⇒ Object
7 8 9 10 11 |
# File 'lib/rails_extension/active_record_extension/errors.rb', line 7 def on_attr_and_type(attribute,type) attribute = attribute.to_s return nil unless @errors.has_key?(attribute) @errors[attribute].collect(&:type).include?(type) end |