ryanza/stateflow — pull request #34 by adamtrilling (2012-08-29 02:21:29+00:00)
Title: Fix deprecation warnings in Rails 4

In Rails 4, using the scope method as used in the ActiveRecord persistence module causes the following deprecation warning:

DEPRECATION WARNING: Using #scope without passing a callable object is deprecated. For example `scope :red, where(color: 'red')` should be changed to `scope :red, -> { where(color: 'red') }`. There are numerous gotchas in the former usage and it makes the implementation more complicated and buggy. (If you prefer, you can just define a class method named `self.red`.). (called from scope at /Users/adam/code/botornot/rails_server/vendor/bundle/ruby/1.9.1/bundler/gems/activerecord-deprecated_finders-fe150f26f009/lib/active_record/deprecated_finders/base.rb:71)

I followed the instructions and now stateflow works in Rails master. All tests pass in Rails 3.2.6 as well.

Also, echoe was required in the Rakefile but not specified as a dependency, so I added it to the gemspec.