Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alvarobp-acts_as_inverse_sortable

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alvarobp-acts_as_inverse_sortable

  • 0.1.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= 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

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc