-
Notifications
You must be signed in to change notification settings - Fork 95
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
List all possible states an object can have #33
Comments
Seems good. Is there a possibility to have multiple machines in the same model? If there is, you need to provide multiple "possible_states" methods. BTW: add yourself to README/LICENSE files. You're the current maintainer of the gem, aren't you? You can also move the repository to your github account if you wish. |
-> Ack.
You're right, this would make sense, will do so later. |
@qoobaa you would need to transfer ownership for this repository to my account since I can't do that myself, then I'll update licence, contact details etc. |
I'll do it later. You can always create a fork or something. |
Great, thanks! |
@troessner, I have a module I use that does something similar:
I have been thinking about the multiple state machines per model/class. Currently, the ActiveRecord Module would break under these circumstances as it only ever writes to a field named |
Very good point.
Yes, please create a new issue. Actually, I can't think of a "real life" use case for multiple state machines. |
Take a look at https://github.com/qoobaa/pioneers/blob/master/app/models/game.rb and try to merge those machines, or create a separate model :-). |
@qoobaa hmm, I see. Well, at least now I know a real life example...:-) |
Can you delete your fork? Then I'll try to transfer the repo again. |
Done...:-) |
3c5cb9d |
Concrete use case:
Admin interface: List all possible state names an object can have.
Right now this is only possible like this:
which is obscure and counter intuitive.
We need something which is intuitive and easily accessible a la:
which the first state machine being the default argument or something like that.
I'll look into this as soon as possible.
The text was updated successfully, but these errors were encountered: