summaryrefslogtreecommitdiffstats
path: root/lib/redmine/default_data/loader.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-12-03 18:21:32 +0000
commit31c33f462d92aead29b8feb6445d8fe5626c4963 (patch)
tree0818c626e553e1cbb606e9c23a7342583288d448 /lib/redmine/default_data/loader.rb
parent013c6fe009e74892659c64c2936a2668a9663985 (diff)
downloadredmine-31c33f462d92aead29b8feb6445d8fe5626c4963.tar.gz
redmine-31c33f462d92aead29b8feb6445d8fe5626c4963.zip
Replaces find(:first) calls.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10928 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/default_data/loader.rb')
-rw-r--r--lib/redmine/default_data/loader.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/redmine/default_data/loader.rb b/lib/redmine/default_data/loader.rb
index 70629e9d3..20ba6eabb 100644
--- a/lib/redmine/default_data/loader.rb
+++ b/lib/redmine/default_data/loader.rb
@@ -26,10 +26,10 @@ module Redmine
# Returns true if no data is already loaded in the database
# otherwise false
def no_data?
- !Role.find(:first, :conditions => {:builtin => 0}) &&
- !Tracker.find(:first) &&
- !IssueStatus.find(:first) &&
- !Enumeration.find(:first)
+ !Role.where(:builtin => 0).exists? &&
+ !Tracker.exists? &&
+ !IssueStatus.exists? &&
+ !Enumeration.exists?
end
# Loads the default data