SoActive is a Ruby gem to scope active posts in an ActiveRecord-based appliation.
Add this line to your application's Gemfile:
gem 'so_active'
And then execute:
$ bundle
Or install it yourself as:
$ gem install so_active
class Post < ActiveRecord::Base
extend SoActive::Scopes
Post.active #=> Returns back posts where active: true
- Fork it ( http://github.com//so_active/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request