Rails : Best practices to change data in Production database

The situation might come when the whole data-column in few tables of production database have to be altered. Most probably when you forgot to set default value in data-fields and stored Null value is troubling you when querying. Continue reading


Ruby On Rails : Exception Handling Best practices

There are various ways to rescue from exceptions raised in Rails App.

The most basic is

rescue NameOfException => exc
   logger.error("Message for the log file #{exc.message}")
   flash[:notice] = "Store error message"
   redirect_to(:action => 'index')

Or you can render a static HTML file namely public/401.html or public/400.html.erb
Continue reading