def create
begin
@model =Model.create!(params)
#if params do not contain the not null column
render json: @model, status: 201
rescue
render status: 403
end
end
You should use validations in this case or at least rescue a more specific exception class.
However this is not the right mailing list for these kind of issues. Please ask on a rails list.
--
Regards Lars