Browse Source

fix typo of Enumeration#overridding_change?

git-svn-id: http://svn.redmine.org/redmine/trunk@13056 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/2.6.0
Toshi MARUYAMA 10 years ago
parent
commit
5e0d93b689
2 changed files with 3 additions and 3 deletions
  1. 1
    1
      app/models/enumeration.rb
  2. 2
    2
      app/models/project.rb

+ 1
- 1
app/models/enumeration.rb View File

@@ -104,7 +104,7 @@ class Enumeration < ActiveRecord::Base
end

# Does the +new+ Hash override the previous Enumeration?
def self.overridding_change?(new, previous)
def self.overriding_change?(new, previous)
if (same_active_state?(new['active'], previous.active)) && same_custom_values?(new,previous)
return false
else

+ 2
- 2
app/models/project.rb View File

@@ -252,10 +252,10 @@ class Project < ActiveRecord::Base
parent_activity = TimeEntryActivity.find(activity['parent_id'])
activity['name'] = parent_activity.name
activity['position'] = parent_activity.position
if Enumeration.overridding_change?(activity, parent_activity)
if Enumeration.overriding_change?(activity, parent_activity)
project_activity = self.time_entry_activities.create(activity)
if project_activity.new_record?
raise ActiveRecord::Rollback, "Overridding TimeEntryActivity was not successfully saved"
raise ActiveRecord::Rollback, "Overriding TimeEntryActivity was not successfully saved"
else
self.time_entries.
where(["activity_id = ?", parent_activity.id]).

Loading…
Cancel
Save