Forgive my n00bness, but I'm a bit confused about this part of the documentation:
Built in ActiveRecord Errors
Out of the box, Rocket Pants will automatically map the following to built in errors and rescue them as appropriate.
ActiveRecord::RecordNotFound into RocketPants::NotFound
ActiveRecord::RecordNotSaved into RocketPants::InvalidResource (with no validation messages).
ActiveRecord::RecordInvalid into RocketPants::InvalidResource (with messages in the "messages" key of the JSON).
If I want to return ActiveRecord errors caused from @resource.save, how would I do that? How would I use this "ActiveRecord::RecordNotSaved into RocketPants::InvalidResource" for error! ?
Thanks in advance,
The answer is pretty simple - if you use save, create etc, just use save!, create! and so forth - these versions throw exceptions when they fail, which RocketPants will automatically rescue from and handle.
Closing for the moment - Let me and I'll reopen if you have more questions.