Hi
I have a model like this:
class Schedules < ActiveRecord::Base
validates_presence_of :scheduleTime
end
I do not have a view, as my controller only works as a JSON talking webservice, but I would like to "catch" what ever validations errors (there will be more validations in the future) from the model in the controller, and return a error message/code in my JSON response.
How can I do this?
Thank you