Home change AASM state through edit action
Reply: 0

change AASM state through edit action

user531 Published in July 19, 2018, 3:11 pm

I'm using AASM to manage states in my User model.

I want to change the status through the edit action.

To do this I'm using the method User.aasm_states_for_select in my form to populate the select input for states. When I hit the button commit all the changes are saved, including the state name. But the AASM event for that state is not called, it is happening because only the field status has changed and the event method has not been called.

Does anyone have a solution for my problem?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.379467 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO