Using RABL in Rails 3.2.x, given the following controller action:
respond_to :html, :json
def create
@foo = Foo.create(params[:foo])
respond_with @foo
end
Assuming the validation fails, how do you get respond_with to use a RABL template instead of the standard JSON hash of errors -- IE. I would like other model attributes besides the validation error message sent back along with the request.
Suggestions?