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

Update README.md #58

Closed
wants to merge 1 commit into from
Closed

Conversation

bradgessler
Copy link
Contributor

Describe the change

Fix ActiveRecord code example typo.

Why are we doing this?

Better for newbs

Benefits

Less confusion

Drawbacks

It will take 4 seconds to merge.

Requirements

Put an X between brackets on each line if you have done the item:
[] Tests written & passing locally?
[] Code style checked?
[] Rebased with master branch?
[] Documentation updated?

Fix ActiveRecord code example typo
@coveralls
Copy link

coveralls commented Nov 27, 2019

Coverage Status

Coverage increased (+3.3%) to 77.671% when pulling f1cd943 on bradgessler:patch-2 into 3903f59 on piotrmurach:master.

@piotrmurach
Copy link
Owner

Hi Brad,

Thanks for contributing!

Correct me if I'm wrong but quickly checking the example, I think the change should be event.to to read the state to transition to from the event object?

@bradgessler
Copy link
Contributor Author

Yeah, when I opened this ticket that callback wasn't getting an Event object; instead it was getting a symbol. I'm trying to recreate now and I can't, so I'll close this issue, spend some more time with it, and open it if I can recreate.

@bradgessler bradgessler closed this Dec 2, 2019
@piotrmurach
Copy link
Owner

As things stand the docs are incorrect. It probably should say event.to as that's what gets yielded to the block, a TransitionEvent value object. If that's not the case then that's defo a bug. So if you have a minute to fix the docs I would appreciate it.

@bradgessler
Copy link
Contributor Author

I'll have a look later this evening.

Unrelated: I've got a pretty interesting approach to state machines in Rails in the works that I hope to make a gem. After looking at about 10 state machine libraries for Ruby, this one was by far the best in terms of architecture, so it will be the underlying lib for this gem if I get it to a more polished state.

In less words: thank you for this lib, you did some really great work.

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