Skip to content

ideasasylum/deepstate-rails

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deepstate::Rails

Rails integration of DeepState.

Usage

class Cat < ApplicationRecord
  include DeepState::Rails

  use_deep_state_machine LifeOfACat, column: :state, as: :life, with: {}
end

will add a LifeOfACat state machine to any instance of Cat using the state column to store the state.

Adds model and cat to the state machine context.

See DeepState for more details on how to specify a state machine

Installation

Add this line to your application's Gemfile:

gem 'deepstate-rails'

And then execute:

$ bundle

Or install it yourself as:

$ gem install deepstate-rails

License

The gem is available as open source under the terms of the MIT License.

About

Rails integration for DeepState machines

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published