]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/ability.rb
Make rubocop happy
[rails.git] / app / models / ability.rb
index 2f86ea4120df3fc3de02b4351055aea79530def0..5be0b37e561068e3aaf0f05b26f0c54475590c38 100644 (file)
@@ -17,9 +17,7 @@ class Ability
 
       can [:create, :edit, :comment, :subscribe, :unsubscribe], DiaryEntry
 
-      if user.administrator?
-        can [:hide, :hidecomment], [DiaryEntry, DiaryComment]
-      end
+      can [:hide, :hidecomment], [DiaryEntry, DiaryComment] if user.administrator?
     end
     # Define abilities for the passed in user here. For example:
     #