Coder Social home page Coder Social logo

Improve README. Docs. about transitions HOT 13 CLOSED

troessner avatar troessner commented on July 20, 2024
Improve README. Docs.

from transitions.

Comments (13)

qoobaa avatar qoobaa commented on July 20, 2024

Feel free to write one ;-). Any other volunteers?

from transitions.

jerodsanto avatar jerodsanto commented on July 20, 2024

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.

qoobaa avatar qoobaa commented on July 20, 2024

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.

ans82 avatar ans82 commented on July 20, 2024

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.

qoobaa avatar qoobaa commented on July 20, 2024

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.

netizer avatar netizer commented on July 20, 2024

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.

qoobaa avatar qoobaa commented on July 20, 2024

Added to readme. Thanks.

from transitions.

Burgestrand avatar Burgestrand commented on July 20, 2024

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.

qoobaa avatar qoobaa commented on July 20, 2024

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.

Burgestrand avatar Burgestrand commented on July 20, 2024

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.

troessner avatar troessner commented on July 20, 2024

@Burgestrand Would you mind submitting a pull request with your documentation updates?

from transitions.

Burgestrand avatar Burgestrand commented on July 20, 2024

@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.

troessner avatar troessner commented on July 20, 2024

@Burgestrand Alright -> closing this issue.

from transitions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.