From 531e298b140350af83e818d44f1cb688a93deb40 Mon Sep 17 00:00:00 2001 From: Sylvain Date: Tue, 23 Apr 2019 13:04:50 +0200 Subject: [PATCH] [bug] updating a setting does not chain new values --- CHANGELOG.md | 1 + app/models/history_value.rb | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2a8d9215..6f8bf809e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ - Fix a bug: (spanish) some translations are not loaded correctly - Fix a bug: some users may not appear in the admin's general listing +- Fix a bug: updating a setting does not chain new values - Improved translations syntax according to YML specifications - [TODO DEPLOY] `rake fablab:fix:users_group_ids` diff --git a/app/models/history_value.rb b/app/models/history_value.rb index 07a7660be..389aa530e 100644 --- a/app/models/history_value.rb +++ b/app/models/history_value.rb @@ -7,6 +7,8 @@ class HistoryValue < ActiveRecord::Base belongs_to :setting belongs_to :user + after_create :chain_record + def chain_record self.footprint = compute_footprint save!