If you are developing an API with Rails you need to rescue from the errors produced by a bad formatted JSON. In order to do that I use a middleware file placed in app/middleware named ParamsParserRescue.rb.
REST is a style of software architecture, often used in web. The design of Rails, for instance, is based a lot on REST. The idea behind this architecture is to have very similar interfaces to access all the resources in your system.
Recently I had to create 2 APIs in 3 months so I had to learn all I could in a very short time. I’d like to share some conclusions but giving the fact that to develop an API people usually say you need 10 years of experience take them with caution.
A predicate method is tipically one that should return a boolean value (true or false). These methods are useful in a lot of scenarios, like when you have an class with a boolean attribute.