aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorEdouard Maffert2016-08-19 11:48:17 +0200
committerEdouard Maffert2016-08-19 11:48:17 +0200
commitb2eeaa1eb9f8e4788ef1467bd6fbd2dd4aa6300c (patch)
tree427103d3eaba70110aeb6f4f40b8b82c2d5bdff4 /app
parent3006b23a21ab2d5671e29c1241fd5cf672f9ce1d (diff)
downloadchouette-core-b2eeaa1eb9f8e4788ef1467bd6fbd2dd4aa6300c.tar.bz2
fix codiflinesynchronization and add better synchronization messages
Diffstat (limited to 'app')
-rw-r--r--app/models/line_referential_sync.rb4
-rw-r--r--app/views/line_referentials/show.html.slim2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/models/line_referential_sync.rb b/app/models/line_referential_sync.rb
index 163d87f8e..763936f3b 100644
--- a/app/models/line_referential_sync.rb
+++ b/app/models/line_referential_sync.rb
@@ -3,8 +3,8 @@ class LineReferentialSync < ActiveRecord::Base
has_many :line_sync_operations, dependent: :destroy
- def record_status status
- line_sync_operations << LineSyncOperation.new(status: status)
+ def record_status status, message
+ line_sync_operations << LineSyncOperation.new(status: status, message: message)
line_sync_operations.first.destroy while line_sync_operations.count > 30
end
end
diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim
index 9e8d5b314..ddd82950a 100644
--- a/app/views/line_referentials/show.html.slim
+++ b/app/views/line_referentials/show.html.slim
@@ -18,7 +18,7 @@
ul.list-group width="75%"
- @line_referential.line_referential_sync.line_sync_operations.each do |sync|
- li = "#{sync.created_at} - #{sync.status}"
+ li = "#{sync.created_at} - #{sync.message}"
= semantic_form_for @line_referential, :url => line_referential_path do |form|
= form.inputs do