module ApplicationForm
Constants
- VERSION
Public Instance Methods
assign_attributes(attrs = {})
click to toggle source
Calls superclass method
# File lib/application_form.rb, line 59 def assign_attributes(attrs = {}) permitted_attrs = permit_attrs(attrs) super(permitted_attrs) end
assign_attrs(attributes)
click to toggle source
# File lib/application_form.rb, line 80 def assign_attrs(attributes) assign_attributes(attributes) self end
checks_passed?()
click to toggle source
# File lib/application_form.rb, line 72 def checks_passed? valid? end
first_error_message()
click to toggle source
# File lib/application_form.rb, line 68 def first_error_message errors&.full_messages&.first end
first_failed_check()
click to toggle source
# File lib/application_form.rb, line 76 def first_failed_check errors.details[:base].first[:error].to_s end
permit_attrs(attrs)
click to toggle source
# File lib/application_form.rb, line 64 def permit_attrs(attrs) attrs.respond_to?(:permit) ? attrs.send(:permit, self.class._permitted_args) : attrs end
update(attrs = {})
click to toggle source
Calls superclass method
# File lib/application_form.rb, line 49 def update(attrs = {}) permitted_attrs = permit_attrs(attrs) super(permitted_attrs) end
update!(attrs = {})
click to toggle source
Calls superclass method
# File lib/application_form.rb, line 54 def update!(attrs = {}) permitted_attrs = permit_attrs(attrs) super(permitted_attrs) end