From 2cd00fdc295b7f67668e45a0fc23f49ec93a1eb3 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 5 Dec 2014 12:34:59 +0000 Subject: [PATCH] Removed unused scopes. git-svn-id: http://svn.redmine.org/redmine/trunk@13715 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/time_entry.rb | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/app/models/time_entry.rb b/app/models/time_entry.rb index 240df7556..c875afbb1 100644 --- a/app/models/time_entry.rb +++ b/app/models/time_entry.rb @@ -52,21 +52,6 @@ class TimeEntry < ActiveRecord::Base joins(:issue). where("#{Issue.table_name}.root_id = #{issue.root_id} AND #{Issue.table_name}.lft >= #{issue.lft} AND #{Issue.table_name}.rgt <= #{issue.rgt}") } - scope :on_project, lambda {|project, include_subprojects| - joins(:project). - where(project.project_condition(include_subprojects)) - } - scope :spent_between, lambda {|from, to| - if from && to - where("#{TimeEntry.table_name}.spent_on BETWEEN ? AND ?", from, to) - elsif from - where("#{TimeEntry.table_name}.spent_on >= ?", from) - elsif to - where("#{TimeEntry.table_name}.spent_on <= ?", to) - else - where(nil) - end - } safe_attributes 'hours', 'comments', 'project_id', 'issue_id', 'activity_id', 'spent_on', 'custom_field_values', 'custom_fields' -- 2.39.5