When ActiveRecord does not find a record
In Rails, when ActiveRecord does not find a record with the specified ID raises and exception. A good way to control this exception is to intercept it and respond with an appropriate HTTP status code, in this case a 404. This is a simple example:
Labels: ActiveRecord, rails
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home