aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert2017-05-06 06:03:19 +0200
committerRobert2017-05-09 12:11:36 +0200
commit95776acb5113d3a44044e74c06b1dbf9df0e1ec8 (patch)
tree8ddc53580a789d82b57d8627ae7715e1fdc9ac04
parent169b5e1a22c9b3a91d1ddb2ec74b97d768d9bc14 (diff)
downloadchouette-core-95776acb5113d3a44044e74c06b1dbf9df0e1ec8.tar.bz2
minor esthetic correction
-rw-r--r--app/controllers/routes_controller.rb3
-rw-r--r--lib/stif/codif_line_synchronization.rb10
-rw-r--r--lib/stif/reflex_synchronization.rb2
3 files changed, 6 insertions, 9 deletions
diff --git a/app/controllers/routes_controller.rb b/app/controllers/routes_controller.rb
index 5a73d397c..73febc4b9 100644
--- a/app/controllers/routes_controller.rb
+++ b/app/controllers/routes_controller.rb
@@ -46,9 +46,6 @@ class RoutesController < ChouetteController
end
end
- # overwrite inherited resources to use delete instead of destroy
- # foreign keys will propagate deletion)
-
def destroy
destroy! do |success, failure|
success.html { redirect_to referential_line_path(@referential,@line) }
diff --git a/lib/stif/codif_line_synchronization.rb b/lib/stif/codif_line_synchronization.rb
index feb313f45..2bb4d8778 100644
--- a/lib/stif/codif_line_synchronization.rb
+++ b/lib/stif/codif_line_synchronization.rb
@@ -11,18 +11,18 @@ module Stif
def processed_counts
{
- imported: self.imported_count,
- updated: self.updated_count,
- deleted: self.deleted_count
+ imported: imported_count,
+ updated: updated_count,
+ deleted: deleted_count
}
end
def increment_counts prop_name, value
- self.send("#{prop_name}=", self.send(prop_name) + value)
+ send("#{prop_name}=", self.send(prop_name) + value)
end
def synchronize
- self.reset_counts
+ reset_counts
start_time = Process.clock_gettime(Process::CLOCK_MONOTONIC, :second)
# Fetch Codifline data
client = Codifligne::API.new
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb
index 6d8497bce..675486265 100644
--- a/lib/stif/reflex_synchronization.rb
+++ b/lib/stif/reflex_synchronization.rb
@@ -35,7 +35,7 @@ module Stif
end
def synchronize
- self.reset_counts
+ reset_counts
['getOR', 'getOP'].each do |method|
start = Time.now
results = Reflex::API.new().process(method)