end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'move_issues']).destroy
+ Permission.where("controller=? and action=?", 'projects', 'move_issues').first.destroy
end
end
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'add_note']).destroy
+ Permission.where("controller=? and action=?", 'issues', 'add_note').first.destroy
end
end
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'export_issues_pdf']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'export_pdf']).destroy
+ Permission.where("controller=? and action=?", 'projects', 'export_issues_pdf').first.destroy
+ Permission.where("controller=? and action=?", 'issues', 'export_pdf').first.destroy
end
end
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'activity']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'calendar']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'gantt']).destroy
+ Permission.where("controller=? and action=?", 'projects', 'activity').first.destroy
+ Permission.where("controller=? and action=?", 'projects', 'calendar').first.destroy
+ Permission.where("controller=? and action=?", 'projects', 'gantt').first.destroy
end
end
add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
- Permission.find(:first, :conditions => ["controller=? and action=?", 'issues', 'history']).destroy
+ Permission.where("controller=? and action=?", 'issues', 'history').first.destroy
end
end
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'news', 'add_comment']).destroy
- Permission.find(:first, :conditions => ["controller=? and action=?", 'news', 'destroy_comment']).destroy
+ Permission.where("controller=? and action=?", 'news', 'add_comment').first.destroy
+ Permission.where("controller=? and action=?", 'news', 'destroy_comment').first.destroy
end
end
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'add_query']).destroy
+ Permission.where("controller=? and action=?", 'projects', 'add_query').first.destroy
end
end
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
end
def self.down
- Permission.find(:first, :conditions => ["controller=? and action=?", 'projects', 'roadmap']).destroy
+ Permission.where("controller=? and action=?", 'projects', 'roadmap').first.destroy
end
end