rails_statusable
A Rails plugin for flexible, model-specific status fields with dynamic methods.
Usage
class Post < ApplicationRecord
include RailsStatusable
statusable statuses: %w[draft published archived], default: 'draft'
end
# install migration
rails generate rails_statusable:install
Installation
Add this line to your application's Gemfile:
gem "rails_statusable"
And then execute:
$ bundle
Or install it yourself as:
$ gem install rails_statusable
Resources
License
The gem is available as open source under the terms of the MIT License.