Module: Outpost::Test
Instance Method Summary collapse
-
#create_permissions ⇒ Object
Populate the permissions table.
Instance Method Details
#create_permissions ⇒ Object
Populate the permissions table. Especially useful when using truncation strategy.
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/outpost/test.rb', line 9 def created = [] Outpost.config.registered_models.each do |model| if !Permission.exists?(resource: model) created << Permission.create(resource: model) end end created end |