We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not sure, if it is problem of this gem, but people might be trying to find solution here.
This is my code:
class Recipe < ActiveRecord::Base default_scope {where(:state => :approved)}
include Workflow workflow_column :state workflow do state :new do event :approve, transitions_to: :approved end state :approved end end
when I run rails c: Recipe.new.state => :approved
when commenting out defaul_scope, it is ok.
The text was updated successfully, but these errors were encountered:
I use this workaround:
def initialize(attrs={}, *args) super({:state => :new}.merge!(attrs), args) end
Sorry, something went wrong.
No branches or pull requests
Not sure, if it is problem of this gem, but people might be trying to find solution here.
This is my code:
class Recipe < ActiveRecord::Base
default_scope {where(:state => :approved)}
include Workflow
workflow_column :state
workflow do
state :new do
event :approve, transitions_to: :approved
end
state :approved
end
end
when I run rails c:
Recipe.new.state
=> :approved
when commenting out defaul_scope, it is ok.
The text was updated successfully, but these errors were encountered: