Fix most auto-correctable rubocop issues

This commit is contained in:
Tom Hughes 2015-02-16 19:02:59 +00:00
parent 34e3e51456
commit ef7f3d800c
206 changed files with 2925 additions and 3473 deletions

View file

@ -1,7 +1,7 @@
class UserRole < ActiveRecord::Base
belongs_to :user
ALL_ROLES = ['administrator', 'moderator']
ALL_ROLES = %w(administrator moderator)
validates_inclusion_of :role, :in => ALL_ROLES
validates_uniqueness_of :role, :scope => :user_id