Tag Archives: activerecord

Updating Objects

How can you efficiently update a model instance without re-saving the entire object? You can use the ActiveRecord update function. It takes a model instance and a field, and updates only that field in that object. No need to re-save, or to save the entire object! Continue reading

Posted in Development | Tagged , , | Comments Off

Ordering Lists of Objects

Once you’ve created a model instance, and you have a collection of these suckers, how can you sort that list? find and find_all both take a parameter called order, which you can use to specify the order of your results. Continue reading

Posted in Development | Tagged , | Comments Off