Show More
Commit Description:
fixed error when submitted file is nil...
Commit Description:
fixed error when submitted file is nil
git-svn-id: http://theory.cpe.ku.ac.th/grader/web/trunk@366 6386c4cd-e34a-4fa8-8920-d93eb39b512e
References:
File last commit:
Show/Diff file:
Action:
db/migrate/020_add_graders_right_to_admin_role.rb
| 17 lines
| 467 B
| text/x-ruby
| RubyLexer
|
|
r58 | class AddGradersRightToAdminRole < ActiveRecord::Migration | ||
def self.up | ||||
admin_role = Role.find_by_name('admin') | ||||
graders_right = Right.create(:name => 'graders_admin', | ||||
:controller => 'graders', | ||||
:action => 'all') | ||||
admin_role.rights << graders_right; | ||||
admin_role.save | ||||
end | ||||
def self.down | ||||
graders_right = Right.find_by_name('graders_admin') | ||||
graders_right.destroy | ||||
end | ||||
end | ||||