module Renderror::Validate::ClassMethods
Public Instance Methods
renderror_validate(*validations)
click to toggle source
# File lib/renderror/validate.rb, line 39 def renderror_validate(*validations) sanitized_validations(validations).each do |validation| send("validate_#{validation}") end end
sanitized_validations(validation_list)
click to toggle source
# File lib/renderror/validate.rb, line 45 def sanitized_validations(validation_list) validation_list.select { |e| PERMITTED_VALIDATIONS.include? e } end
validate_jsonapi_id()
click to toggle source
# File lib/renderror/validate.rb, line 53 def validate_jsonapi_id before_action :validate_jsonapi_id, only: :update end
validate_jsonapi_type()
click to toggle source
# File lib/renderror/validate.rb, line 49 def validate_jsonapi_type before_action :validate_jsonapi_type, only: %i[create update] end