Commit b5a544e6be0c5569552794f99340e9bf49786f42

Authored by Victor Costa
1 parent 044c051c

Fix action date in process rules scripts

Showing 1 changed file with 3 additions and 3 deletions   Show diff stats
script/process_merit_rules.rb
... ... @@ -3,12 +3,12 @@
3 3  
4 4 class ProcessObserver
5 5 def update(changed_data)
6   - #puts changed_data
7 6 merit = changed_data[:merit_object]
8 7 if merit.kind_of?(Merit::Score::Point)
9   - #puts "FIX"
10 8 action = Merit::Action.find(changed_data[:merit_action_id])
11   - merit.update_attribute(:created_at, YAML.load(action.target_data).created_at)
  9 + new_date = YAML.load(action.target_data).created_at
  10 + action.update_attribute(:created_at, new_date)
  11 + merit.update_attribute(:created_at, new_date)
12 12 end
13 13 end
14 14 end
... ...