diff app/models/time_entry.rb @ 931:ec1c49528f36 cannam_integration

Merge from branch "redmine-1.3"
author Chris Cannam
date Wed, 27 Jun 2012 15:04:58 +0100
parents 5f33065ddc4b
children 433d4f72a19b
line wrap: on
line diff
--- a/app/models/time_entry.rb	Wed Jun 27 14:56:14 2012 +0100
+++ b/app/models/time_entry.rb	Wed Jun 27 15:04:58 2012 +0100
@@ -16,6 +16,7 @@
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
 class TimeEntry < ActiveRecord::Base
+  include Redmine::SafeAttributes
   # could have used polymorphic association
   # project association here allows easy loading of time entries at project level with one database trip
   belongs_to :project
@@ -46,6 +47,8 @@
     :conditions => Project.allowed_to_condition(args.shift || User.current, :view_time_entries, *args)
   }}
 
+  safe_attributes 'hours', 'comments', 'issue_id', 'activity_id', 'spent_on', 'custom_field_values'
+
   def after_initialize
     if new_record? && self.activity.nil?
       if default_activity = TimeEntryActivity.default