6 lines
172 B
Ruby
6 lines
172 B
Ruby
class AdminOnlyPolicy < ApplicationPolicy
|
|
[:create?, :destroy?, :edit?, :index?, :new?, :show?, :update?].each do |action|
|
|
define_method(action) { admin? }
|
|
end
|
|
end
|