New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mikejones-acts_as_state_machine

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mikejones-acts_as_state_machine

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

= Acts As State Machine

This act gives an Active Record model the ability to act as a finite state machine (FSM).

Acquire via subversion at:

http://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk

If prompted, use the user/pass anonymous/anonymous.

== Example

class Order < ActiveRecord::Base acts_as_state_machine :initial => :opened

state :opened state :closed, :enter => Proc.new {|o| Mailer.send_notice(o)} state :returned

event :close do transitions :to => :closed, :from => :opened end

event :return do transitions :to => :returned, :from => :closed end end

o = Order.create o.close! # notice is sent by mailer o.return!

FAQs

Package last updated on 11 Aug 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc