Added module that automatically generate ActiveRecord scopes based on workflow states