diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-20 07:10:46 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-20 07:10:46 +0000 |
commit | 9b5ce4b7b44beadc00c80f1e8ab24b6e487a462b (patch) | |
tree | 097664e27da31cf860571ce225c644f7b9c8121b /db/migrate/047_add_boards_permissions.rb | |
parent | 5c5ba0c61af44bdbd8931c131192963179cca9ac (diff) | |
download | redmine-9b5ce4b7b44beadc00c80f1e8ab24b6e487a462b.tar.gz redmine-9b5ce4b7b44beadc00c80f1e8ab24b6e487a462b.zip |
Rails4: db migrate: replace "Permission.find_by_controller_and_action"
git-svn-id: http://svn.redmine.org/redmine/trunk@12422 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/047_add_boards_permissions.rb')
-rw-r--r-- | db/migrate/047_add_boards_permissions.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/db/migrate/047_add_boards_permissions.rb b/db/migrate/047_add_boards_permissions.rb index 5b1f6f779..1a9f095f7 100644 --- a/db/migrate/047_add_boards_permissions.rb +++ b/db/migrate/047_add_boards_permissions.rb @@ -9,8 +9,8 @@ class AddBoardsPermissions < ActiveRecord::Migration end def self.down - Permission.find_by_controller_and_action("boards", "new").destroy - Permission.find_by_controller_and_action("boards", "edit").destroy - Permission.find_by_controller_and_action("boards", "destroy").destroy + Permission.where(:controller => "boards", :action => "new").each {|p| p.destroy} + Permission.where(:controller => "boards", :action => "edit").each {|p| p.destroy} + Permission.where(:controller => "boards", :action => "destroy").each {|p| p.destroy} end end |