solidus

https://github.com/solidusio/solidus

Ruby

🛒 Solidus, the open-source eCommerce framework for industry trailblazers.

Spree::Ability.register_ability

Allows us to go beyond the standard cancan initialize method which makes it difficult for engines to
modify the default +Ability+ of an application.  The +ability+ argument must be a class that includes
the +CanCan::Ability+ module.  The registered ability should behave properly as a stand-alone class
and therefore should be easy to test in isolation.

Source | Google | Stack overflow

Edit

git clone [email protected]:solidusio/solidus.git

cd solidus

open core/app/models/spree/ability.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Spree--Ability-register_ability-for-pr


# Commit to git

git add core/app/models/spree/ability.rbgit commit -m "better docs for Spree::Ability.register_ability"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Spree--Ability-register_ability-for-pr

hub pull-request


# Celebrate!