The project is in a healthy, maintained state
Rails plugin that adds configurable status fields to models with dynamic methods like draft?, published?, etc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 6.0.0
 Project Readme

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.