2018-07-24 06:00:56 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-04-05 12:42:57 -04:00
|
|
|
class ProjectPolicy
|
|
|
|
module ClassMethods
|
|
|
|
def create_read_update_admin_destroy(name)
|
|
|
|
[
|
|
|
|
:"read_#{name}",
|
|
|
|
*create_update_admin_destroy(name)
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
|
|
|
def create_update_admin_destroy(name)
|
|
|
|
[
|
|
|
|
:"create_#{name}",
|
|
|
|
:"update_#{name}",
|
|
|
|
:"admin_#{name}",
|
|
|
|
:"destroy_#{name}"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|