= acts_as_inverse_sortable
Sets a negative timestamp on an Active Record model for efficiently sort on created_at inverse order.
== Install
gem install alvarobp-acts_as_inverse_sortable --source http://gems.github.com
== Usage
As a very simple plugin, using it is simple. Just add an integer attribute called "created_at_inverse" to your model. Afterwards you can make that model inverse sortable, for example:
class Film < ActiveRecord::Base
acts_as_inverse_sortable
end
Therefore, you can get an inverse sorted array of Films with Film.find(:all, :order => 'created_at_inverse') working on an efficient way.
== Test
Just do
rake test