This commit is contained in:
sw 2014-06-26 14:45:44 +08:00
commit 91180f922a
2 changed files with 14 additions and 1 deletions

View File

@ -0,0 +1,13 @@
# -*coding:utf-8 -*-
class ModifyStudentRoles < ActiveRecord::Migration
def change
# 修改学生权限
# 添加回复讨论区权限
role = Role.find_by_name('学生')
if role
role.permissions.append(:add_messages)
role.save
end
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20140618155324) do
ActiveRecord::Schema.define(:version => 20140626012511) do
create_table "activities", :force => true do |t|
t.integer "act_id", :null => false