-
Notifications
You must be signed in to change notification settings - Fork 208
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
Rails 5 Support Potential Solutions #205
Comments
I am mulling over a Rails 5 upgrade and we use the workflow gem with Rails 4. I did not realize it might be a problem to upgrade to Rails 5 because of this gem, which appears to be (at least relatively?) unmaintained I will let you know how it goes. It's interesting that this project hasn't had a release since 2014, but there are apparently features in the master branch such as the particular implementation of https://github.com/geekq/workflow#conditional-event-transitions described in the README (you cannot use a method symbol name as described in #183 but this apparently is supported in master, based on some work that was merged since v1.2.0) Is there anyone still merging PRs on this gem? Need for volunteers? |
I'm still using stock Another app I converted over to AASM. I like the way states & events are setup in |
I've spoken with other people (this past week at RailsConf 2018) who are of the opinion that "geekq/workflow is not abandoned it's just finished" as in, doesn't have any bugs left in it I don't know if that's true, but I've never used AASM and nobody who knows anything seems to be suggesting to move away from this gem |
I've switched to
I don't quite agree. Most people use workflow in the context of Rails and as of current Master, geekq/workflow is broken on Rails 5 and up. The corresponding note in the README is no fix, just a mere hint at how factoring out the persistence code would be a fix. I'm still having hope though that either @geekq can implement this and/or passes the gem (I mean the authoritative release from rubygems.org) to someone else who will. Otherwise, I'll have to switch to AASM despite the headache this may cause. |
The core of workflow (implementation for state transitions DSL) is stable and has worked for years, as it is now. There is also a stable interface to implement persistence, e.g. for ActiveRecord in Rails or others. Since Rails internal interfaces / implementation change frequently, the integration with Rails is hard to implement in a non fragile way. Also a huge Since I am not using Rails 5.x, I have not implemented any integration with it. Since I do not know, how well the different What I failed to do so far is:
... will do. Disclaimer: on a best effort basis ;-) |
Any updates on the branch that was proposed re: tests for Rails 5 support? Thanks for supporting the improvements of this gem! Just wanted to report that I'm currently also using this in Rails 5.0.7 after upgrading from 4.2. So far, things seem to be working fine. |
For those looking for alternatives other than AASM, the finite_machine gem has just awakened from a two years hibernation. |
Yeah! workflow awakened from hibernation too! Workflow 2.0 released! Please try it out with your application! If it is a Rails application, please use Please report any bugs as a new issue for the relevant of both libraries: Note for contributors: looks like github closed all the pull requests after I had changed the default branch on 2019-01-12. Please check the new refactored workflow 2.0, complementing workflow-activerecord and recreate your pull request if needed. |
I'm opening this issue in an attempt to brainstorm some options for people who are looking to upgrade to Rails 5 and use this gem.
Rewrite Persistence
The readme recommends this:
https://github.com/geekq/workflow#custom-workflow-state-persistence
Fork with Rails 5 Patches
The @spreemo patch seems to have a few patches for the use cases they ran into:
master...spreemo:master
More Major Rewrite
This seems to have yet more integration with ActiveRecord:
https://tylergannon.github.io/rails-workflow
It might be scarier to move into this gem because of the larger rewrite
More?
If anyone else has successfully upgraded to Rails 5 with this gem, please feel free to add comments here. Perhaps we can gather the list of problems and come up with a solution that can be merged into this main project (see also #177 )
The text was updated successfully, but these errors were encountered: