Ruby on Rails - handling large number of abilities in ruby on rails - ruby on rails tutorial - rails guides - rails tutorial - ruby rails
- Once the number of abilities definitions start to grow in number.
- It becomes more and more difficult to handle the Ability file.
Example
Step1:
- To handle these issue is to move abilities into meaningful method.
Step2:
- We can try breaking it into different classes to handle the different responsibilities.
Step3:
- Define those classes as:
- So on with Abilities::Authenticated, Abilities::Admin or any other else