diff options
| author | Robert | 2017-08-02 15:54:01 +0200 | 
|---|---|---|
| committer | Robert | 2017-08-02 15:54:01 +0200 | 
| commit | 22b2893519938de8c49c07b57490aaf294926cee (patch) | |
| tree | 0b7d8d53cc0feb941979e0a92b45f3d0509d1bdf | |
| parent | 4dfee356b2f73f9a315129400831ccb0ce11b8e8 (diff) | |
| download | chouette-core-22b2893519938de8c49c07b57490aaf294926cee.tar.bz2 | |
Refs: #4216@0.3h; Brute force change of `message_attributs` to `message_attributes` in code (not migration or schema!!!)
| -rw-r--r-- | app/models/clean_up.rb | 8 | ||||
| -rw-r--r-- | app/models/line_referential_sync.rb | 12 | ||||
| -rw-r--r-- | app/models/stop_area_referential_sync.rb | 12 | ||||
| -rw-r--r-- | app/views/line_referentials/show.html.slim | 4 | ||||
| -rw-r--r-- | app/views/stop_area_referentials/show.html.slim | 4 | 
5 files changed, 20 insertions, 20 deletions
| diff --git a/app/models/clean_up.rb b/app/models/clean_up.rb index b1135a155..7aab7f32e 100644 --- a/app/models/clean_up.rb +++ b/app/models/clean_up.rb @@ -153,13 +153,13 @@ class CleanUp < ActiveRecord::Base      update_attribute(:started_at, Time.now)    end -  def log_successful message_attributs +  def log_successful message_attributes      update_attribute(:ended_at, Time.now) -    CleanUpResult.create(clean_up: self, message_key: :successfull, message_attributs: message_attributs) +    CleanUpResult.create(clean_up: self, message_key: :successfull, message_attributes: message_attributes)    end -  def log_failed message_attributs +  def log_failed message_attributes      update_attribute(:ended_at, Time.now) -    CleanUpResult.create(clean_up: self, message_key: :failed, message_attributs: message_attributs) +    CleanUpResult.create(clean_up: self, message_key: :failed, message_attributes: message_attributes)    end  end diff --git a/app/models/line_referential_sync.rb b/app/models/line_referential_sync.rb index 6730ddd73..75c1e48a2 100644 --- a/app/models/line_referential_sync.rb +++ b/app/models/line_referential_sync.rb @@ -40,11 +40,11 @@ class LineReferentialSync < ActiveRecord::Base      end    end -  def create_sync_message criticity, key, message_attributs = {} +  def create_sync_message criticity, key, message_attributes = {}      params = {        criticity: criticity,        message_key: key, -      message_attributs: message_attributs +      message_attributes: message_attributes      }      line_referential_sync_messages.create params    end @@ -54,13 +54,13 @@ class LineReferentialSync < ActiveRecord::Base      create_sync_message :info, :pending    end -  def log_successful message_attributs +  def log_successful message_attributes      update_attribute(:ended_at, Time.now) -    create_sync_message :info, :successful, message_attributs +    create_sync_message :info, :successful, message_attributes    end -  def log_failed message_attributs +  def log_failed message_attributes      update_attribute(:ended_at, Time.now) -    create_sync_message :error, :failed, message_attributs +    create_sync_message :error, :failed, message_attributes    end  end diff --git a/app/models/stop_area_referential_sync.rb b/app/models/stop_area_referential_sync.rb index 0e32df4d2..e6cf2ecbc 100644 --- a/app/models/stop_area_referential_sync.rb +++ b/app/models/stop_area_referential_sync.rb @@ -40,11 +40,11 @@ class StopAreaReferentialSync < ActiveRecord::Base      end    end -  def create_sync_message criticity, key, message_attributs = {} +  def create_sync_message criticity, key, message_attributes = {}      params = {        criticity: criticity,        message_key: key, -      message_attributs: message_attributs +      message_attributes: message_attributes      }      stop_area_referential_sync_messages.create params    end @@ -54,13 +54,13 @@ class StopAreaReferentialSync < ActiveRecord::Base      create_sync_message :info, :pending    end -  def log_successful message_attributs +  def log_successful message_attributes      update_attribute(:ended_at, Time.now) -    create_sync_message :info, :successful, message_attributs +    create_sync_message :info, :successful, message_attributes    end -  def log_failed message_attributs +  def log_failed message_attributes      update_attribute(:ended_at, Time.now) -    create_sync_message :error, :failed, message_attributs +    create_sync_message :error, :failed, message_attributes    end  end diff --git a/app/views/line_referentials/show.html.slim b/app/views/line_referentials/show.html.slim index 95c2c02b0..e2381e7e9 100644 --- a/app/views/line_referentials/show.html.slim +++ b/app/views/line_referentials/show.html.slim @@ -44,6 +44,6 @@                            td.text-center                              .fa.fa-circle class="text-#{criticity_class(log.criticity)}"                            td -                            - data = log.message_attributs.symbolize_keys! +                            - data = log.message_attributes.symbolize_keys!                              - data[:processing_time] = distance_of_time_in_words(data[:processing_time].to_i) -                            = t("line_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!).html_safe +                            = t("line_referential_sync.message.#{log.message_key}", log.message_attributes.symbolize_keys!).html_safe diff --git a/app/views/stop_area_referentials/show.html.slim b/app/views/stop_area_referentials/show.html.slim index 56ecbf6da..0fca15fff 100644 --- a/app/views/stop_area_referentials/show.html.slim +++ b/app/views/stop_area_referentials/show.html.slim @@ -37,6 +37,6 @@                            td.text-center                              .fa.fa-circle class="text-#{criticity_class(log.criticity)}"                            td -                            - data = log.message_attributs.symbolize_keys! +                            - data = log.message_attributes.symbolize_keys!                              - data[:processing_time] = distance_of_time_in_words(data[:processing_time].to_i) -                            = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributs.symbolize_keys!).html_safe +                            = t("stop_area_referential_sync.message.#{log.message_key}", log.message_attributes.symbolize_keys!).html_safe | 
