RubyGems.org

I've found that when developing Rails apps, I tend to almost always pair each scope with an instance method which returns a boolean indicating whether the object is included inside that scope.\n\nThis gem simply automatically creates that method for you. Nothing super fancy, and you might consider replacing the state methods with your own, more efficient, implementations - but it's great for early stages of development, or providing a comparative case for unit tests.

installgem install stately_scopes
Authors

Nicholas Bruning

897 total downloads 110 for this version
Owners

0c51f2512454f75ea3ee07005efb0e6a

Licenses

MIT

Gemfile
gem 'stately_scopes', '~> 0.0.4'
Versions
  1. 0.0.4 August 20, 2014 (9 KB)
  2. 0.0.3 June 25, 2014 (8.5 KB)
  3. 0.0.2 April 1, 2014 (8.5 KB)
  4. 0.0.1 March 31, 2014 (8.5 KB)
Runtime Dependencies
  1. activerecord ~> 4.1
Ruby Dependency
  1. >= 0