Comments (13)
Feel free to write one ;-). Any other volunteers?
from transitions.
Its pretty lame to agree to maintain somebody else's code and not even be willing to write any documentation whatsoever.
I think I'll just use state_machine instead.
from transitions.
LOL :-)
It's pretty lame to complain about other people work and not even be willing to do anything to improve it. I didn't know that I'm obliged to write a documentation after I put an effort to create the gem. You're free to fork the code and do whatever you want with it but don't tell me what I should do, ok?
from transitions.
bam... i'new to rails and statemachines. was happy to find this gem, but the doc is still a bit short. maybe you should mention that the default attribute used is "state" AND it is a string. migrated my database with "state :integer" and it took me quite a while to figure out what was going wrong. hope this helps someone!
from transitions.
If you're new to Rails, you should be probably using state_machine gem instead of this one. I created the gem to use it in one of my apps, but finally I used state_machine instead. I don't use the gem now, so I don't have enough time to improve it.
from transitions.
I wrote about this gem a while ago.
http://dev.netizer.pl/transitions-state-machine-for-rails-3.html
You can use my example, or add a link to my article.
from transitions.
Added to readme. Thanks.
from transitions.
In the interest of knowing what to fix in this issue, what would a more complete readme contain? I’m a newbie to this gem myself, and here’s some questions I would’ve liked an answer to (before I read through the code):
- why two modules (Transitions & AR::Transitions)?
- what is the state variable, is it persistent (how?), can I have more than one?
- where can I find an API reference for method options (:guard, :on_transition)?
- how do I fire transitions (also explain bang vs. non-bang call)?
- state query methods?
- “maybe you should mention that the default attribute used is "state" AND it is a string”
I’ll see if I can get myself to write a coherent piece of answers to the above questions. :)
PS: Thanks for maintaining this qoobaa, took me some searching to find this repository but I’m happy I found it. I prefer the DSL of this gem to the others… it feels slinky.
(edit 3th October: added note point about “state” attribute being a string)
from transitions.
There's no need for including two modules (AR::Transitions includes ::Transitions). If you have some time to improve the docs we'd appreciate it :-).
from transitions.
I forked, branched and slightly rewrote the README, adding information about the points I listed. Next up is some actual API documentation; I’ve already begun on the public API :)
from transitions.
@Burgestrand Would you mind submitting a pull request with your documentation updates?
from transitions.
@troessner I did not get very far with the API documentation; I had a few methods documented, but I’ve since lost the repository. All work I did on my fork have already been merged by Jakob (see commit 2cd5024 and earlier).
from transitions.
@Burgestrand Alright -> closing this issue.
from transitions.
Related Issues (20)
- getting "uninitialized constant ActiveRecord::Transitions" with rails 4.1 HOT 2
- can_event methods don't respect guards HOT 1
- Initial state is not set HOT 3
- Problem with Success Callback HOT 5
- Refactor our specs big time
- Introduce rubocop and auto-fix offenses HOT 1
- Fix all remaining rubocop offenses in lib/ and add rubocop to our travis build HOT 1
- Transitions#set_initial_state is forcibly inserting the "state" attribute HOT 6
- new feature: put exception as a param to event_failed HOT 1
- Success callback not fired HOT 1
- Passing parameters to events HOT 1
- Raise error when guard fails HOT 6
- Throw out callbacks... HOT 5
- Introduce Reek for CI HOT 1
- Introduce RDL
- available_state available_events should list states or events in the order they are defined HOT 4
- undefined method `state_machine' for nil:NilClass HOT 4
- Multiple timestamps on state transition HOT 3
- Publish 1.3.0 release HOT 2
- Tapioca DSL compiler interest?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from transitions.