one-click-orgs
https://github.com/oneclickorgs/one-click-orgs
Ruby
Create legal organisations with just one click
Proposal#create_a_decision
This works around a bug in state_machine which means we cannot specify #create_decision directly in the after_transition callback. If we do, ActiveRecord attempts to use the Transition object as attributes to the new Decision object, resulting ultimately in an "undefined method `stringify_keys'" error on the Transition object.
Edit
git clone [email protected]:oneclickorgs/one-click-orgs.git
cd one-click-orgs
open app/models/proposal.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Proposal-create_a_decision-for-pr
# Commit to gitgit add app/models/proposal.rbgit commit -m "better docs for Proposal#create_a_decision"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Proposal-create_a_decision-for-pr
hub pull-request
# Celebrate!