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:installInstallation
Add this line to your application's Gemfile:
gem "rails_statusable"And then execute:
$ bundleOr install it yourself as:
$ gem install rails_statusableResources
License
The gem is available as open source under the terms of the MIT License.