Skip to content
New issue

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

Fixed events variable error. #2

Conversation

troyanryller
Copy link

No description provided.

@rstormsf
Copy link

does it fixes #3 ? Have u seen similar issue? can't get it work at all

@rstormsf
Copy link

Installed your branch in my Gemfile:
gem 'rails_admin_aasm', :git => 'https://github.com/troyanryller/rails_admin_aasm/', :branch => 'feature/fix-undefined-events-variable'
still get this same issue. Any help?

@troyanryller
Copy link
Author

@rstormsf It should be fixed after adding attr_accessor :my-state-field-name_event to your model. Also mention about it in readme.md

@rstormsf
Copy link

:-( Can't understand how to get this work. What should state_event method return?

@troyanryller
Copy link
Author

@rstormsf nothing, it should be only like temporary variable for model, so in model:

attr_accessor :state_event

should fix your problem. If u have other name for aasm field then u need to specify different accessor, for example i got status field for aasm statuses, so i add attr_accessor :status_event to my model and

    rails_admin do
      list do
        field :account
        field :status, :state
        ....

@zcpdog
Copy link
Owner

zcpdog commented Nov 15, 2015

Hi @troyanryller thanks for contribution, I think this pr is duplicated with #1 what do you think

@troyanryller
Copy link
Author

@zcpdod yep, main fix is same...

@zcpdog zcpdog closed this Feb 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants