Articles tagged Ruby on Rails
So you wrote an app and you think it's slow. What can you do? A lot.
Nifty hack that's not terribly awful?
Turn your database schema into a RESTful API in just three commands (including
Tidy up your controllers and introduce descriptive one-liners by wrapping filters with clear method names.
require_dependency to make your code more organized.
Tips and tricks when querying your database and serializing objects in a performant and maintainable manner.
size doesn't hit the database if things are
self makes this clever API slick.
Writing an elegant and DRY API to handle batch actions in Ruby on Rails.
ActiveModel::Attributes to easily create a familiar API for purging
Creating custom exceptions specific to your app's needs is a powerful way to convey intent. What do they look like and where should you put them?
Adding headers for specific HTTP statuses in Ruby on Rails easily with
ActiveModel::Attributes in your models to get the schema-back attributes you love without the schema requirement.