diff --git a/lib/transitions/machine.rb b/lib/transitions/machine.rb
index <HASH>..<HASH> 100644
--- a/lib/transitions/machine.rb
+++ b/lib/transitions/machine.rb
@@ -96,7 +96,7 @@ module Transitions
 
     def include_scopes
       @states.each do |state|
-        @klass.scope state.name.to_sym, @klass.where(:state => state.name)
+        @klass.scope state.name.to_sym, @klass.where(:state => state.name.to_s)
       end
     end
   end
Stringify state name

AR prefixes the state with the table name (i.e. "`traffic_lights`.`state` = `traffic_lights`.`red`") if we pass the name as symbol. We need to pass it as string, so that it works ("`traffic_lights`.`state` = 'red'")