diff options
| author | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-19 10:50:23 +0200 |
|---|---|---|
| committer | Ciro Santilli <ciro.santilli@gmail.com> | 2014-10-19 11:12:39 +0200 |
| commit | b66a1527356d808f418bab273f821c83a4365c90 (patch) | |
| tree | c16192e9aa5e5ad5d3f53da594d2f1bd61cafa4f /app/models/ability.rb | |
| parent | 3880bb61760ef1f69b0df49148202ff6b4208f01 (diff) | |
| download | gitlab-ce-b66a1527356d808f418bab273f821c83a4365c90.tar.gz | |
Factor abilities methods
in app controller, user model and services.
Diffstat (limited to 'app/models/ability.rb')
| -rw-r--r-- | app/models/ability.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index e155abc1449..97a72bf3635 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -262,5 +262,13 @@ class Ability end rules end + + def abilities + @abilities ||= begin + abilities = Six.new + abilities << self + abilities + end + end end end |
