summaryrefslogtreecommitdiffstats
path: root/db/migrate/016_add_repositories_permissions.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:25:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:25:57 +0000
commit738cf2e187f90cd7273ae0de610bfea49b4b799f (patch)
tree7e43e83c5122a06a3a33911cd3e20e67c9856e93 /db/migrate/016_add_repositories_permissions.rb
parent31c33f462d92aead29b8feb6445d8fe5626c4963 (diff)
downloadredmine-738cf2e187f90cd7273ae0de610bfea49b4b799f.tar.gz
redmine-738cf2e187f90cd7273ae0de610bfea49b4b799f.zip
Replaces find(:first) calls in migrations.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10929 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/016_add_repositories_permissions.rb')
-rw-r--r--db/migrate/016_add_repositories_permissions.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/db/migrate/016_add_repositories_permissions.rb b/db/migrate/016_add_repositories_permissions.rb
index 341707639..9fcddb09c 100644
--- a/db/migrate/016_add_repositories_permissions.rb
+++ b/db/migrate/016_add_repositories_permissions.rb
@@ -12,11 +12,11 @@ class AddRepositoriesPermissions < ActiveRecord::Migration
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'repositories', 'show']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'repositories', 'browse']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'repositories', 'entry']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'repositories', 'revisions']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'repositories', 'revision']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'repositories', 'diff']).destroy
+ Permission.where("controller=? and action=?", 'repositories', 'show').first.destroy
+ Permission.where("controller=? and action=?", 'repositories', 'browse').first.destroy
+ Permission.where("controller=? and action=?", 'repositories', 'entry').first.destroy
+ Permission.where("controller=? and action=?", 'repositories', 'revisions').first.destroy
+ Permission.where("controller=? and action=?", 'repositories', 'revision').first.destroy
+ Permission.where("controller=? and action=?", 'repositories', 'diff').first.destroy
end
end