Sha256: a898e80807ffc9ad115217bdc9d040e88af2c4110bbd392d232c3b33b0b7d89d
Contents?: true
Size: 404 Bytes
Versions: 15
Compression:
Stored size: 404 Bytes
Contents
module EmphaticInvalids::Renderer def emphasize_invalids(resource, format) # flash[:error] = error_message(resource) #TODO may want to make this an option format.js { render json: resource.errors, status: :unprocessable_entity } end private def error_message(resource) "Unable to #{action_name} #{resource.class.to_s.humanize}: #{ resource.errors.full_messages.join(', ') }" end end
Version data entries
15 entries across 15 versions & 1 rubygems