Class: ActionController::Parameters
- Inherits:
-
Object
- Object
- ActionController::Parameters
- Defined in:
- lib/ca/validation/core_ext.rb
Instance Method Summary collapse
Instance Method Details
#errors ⇒ Object
8 9 10 |
# File 'lib/ca/validation/core_ext.rb', line 8 def errors @result.errors end |
#full_messages ⇒ Object
12 13 14 |
# File 'lib/ca/validation/core_ext.rb', line 12 def @result.(full: true) end |
#valid?(validator) ⇒ Boolean
3 4 5 6 |
# File 'lib/ca/validation/core_ext.rb', line 3 def valid?(validator) @result = validator.call(permit!.to_hash) @result.errors.empty? end |