Fix camelcase attribute
This commit is contained in:
parent
9481f12294
commit
0b2ad653fa
4 changed files with 7 additions and 3 deletions
|
@ -2,4 +2,8 @@ class Exercice < ActiveRecord::Base
|
|||
belongs_to :etablissement
|
||||
|
||||
validates :ca, presence: true, allow_blank: false, allow_nil: false
|
||||
|
||||
def date_fin_exercice
|
||||
super || dateFinExercice
|
||||
end
|
||||
end
|
||||
|
|
|
@ -49,7 +49,7 @@
|
|||
.col-xs-8.entreprise-info
|
||||
- @facade.etablissement.exercices.each_with_index do |exercice, index|
|
||||
%strong
|
||||
= "#{exercice.dateFinExercice.year} : "
|
||||
= "#{exercice.date_fin_exercice.year} : "
|
||||
= number_to_currency(exercice.ca)
|
||||
%br
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
%th Exercices :
|
||||
%td
|
||||
- etablissement.exercices.each_with_index do |exercice, index|
|
||||
= "#{exercice.dateFinExercice.year} : "
|
||||
= "#{exercice.date_fin_exercice.year} : "
|
||||
= number_to_currency(exercice.ca)
|
||||
%br
|
||||
- if entreprise.rna_information.present?
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FactoryBot.define do
|
||||
factory :exercice do
|
||||
ca '12345678'
|
||||
dateFinExercice "2014-12-30 23:00:00"
|
||||
date_fin_exercice "2014-12-30 23:00:00"
|
||||
date_fin_exercice_timestamp 1419980400
|
||||
association :etablissement, factory: [:etablissement]
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue