You are here

database

Migrate Rails Database

To migrate your database in production environment simply run the following command.

rake db:migrate RAILS_ENV=production

Rails find :conditions

The Class ActiveRecord::Base provides an interesting method to execute searches on the database without the need to write SQL queries. It is the find method.

The find method has some retrieval options (:all, :first, :last, :id) and many parameters which are detailed in the links above. In this article we'd like to focus on the :conditions parameter.

Subscribe to RSS - database