Fix before_save callback.

pull/6827/head
Christian Rijke 12 years ago
parent 191f2e3818
commit 5f6f8d804b
  1. 5
      lib/open_project/costs/patches/time_entry_patch.rb

@ -20,6 +20,8 @@ module OpenProject::Costs::Patches::TimeEntryPatch
}
}
before_save :update_costs
def self.visible_condition(user, project)
%Q{ (#{Project.allowed_to_condition(user, :view_time_entries, :project => project)} OR
(#{Project.allowed_to_condition(user, :view_own_time_entries, :project => project)} AND #{TimeEntry.table_name}.user_id = #{user.id})) }
@ -60,9 +62,6 @@ module OpenProject::Costs::Patches::TimeEntryPatch
end
module InstanceMethods
def before_save
update_costs
end
def real_costs
# This methods returns the actual assigned costs of the entry

Loading…
Cancel
Save