summaryrefslogtreecommitdiffstats
path: root/db/migrate/050_add_wiki_attachments_permissions.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-12-20 07:10:46 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-12-20 07:10:46 +0000
commit9b5ce4b7b44beadc00c80f1e8ab24b6e487a462b (patch)
tree097664e27da31cf860571ce225c644f7b9c8121b /db/migrate/050_add_wiki_attachments_permissions.rb
parent5c5ba0c61af44bdbd8931c131192963179cca9ac (diff)
downloadredmine-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/050_add_wiki_attachments_permissions.rb')
-rw-r--r--db/migrate/050_add_wiki_attachments_permissions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/050_add_wiki_attachments_permissions.rb b/db/migrate/050_add_wiki_attachments_permissions.rb
index c0697be9c..e87a46bb3 100644
--- a/db/migrate/050_add_wiki_attachments_permissions.rb
+++ b/db/migrate/050_add_wiki_attachments_permissions.rb
@@ -8,7 +8,7 @@ class AddWikiAttachmentsPermissions < ActiveRecord::Migration
end
def self.down
- Permission.find_by_controller_and_action('wiki', 'add_attachment').destroy
- Permission.find_by_controller_and_action('wiki', 'destroy_attachment').destroy
+ Permission.where(:controller => "wiki", :action => "add_attachment").each {|p| p.destroy}
+ Permission.where(:controller => "wiki", :action => "destroy_attachment").each {|p| p.destroy}
end
end