12 lines
270 B
Ruby
12 lines
270 B
Ruby
|
class AddQuateProjectPermission < ActiveRecord::Migration
|
||
|
def change
|
||
|
# 添加课程权限
|
||
|
Role.all.each do |role|
|
||
|
if role.name == 'Manager'
|
||
|
role.permissions.append(:quote_project)
|
||
|
role.save(:validate => false)
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|