ruby on rails - Two variables in string -


i tried add 2 variables string:

if code.alter_fehler == 'k' && code.alter_o.to_f <= 124     @arr << "bitte kodierung überprüfen: kode gilt überwiegend nur für patienten in der              altersgruppe zwischen #{jahrtag(code.alter_u,'')}               und {jahrtag('',code.alter_o)}." end 

how can see call in string 2 times def jahrtag in application controller:

 def jahrtag(zahlu,zahlo) if (zahlu && zahlo) == '0' return 'o tagen' end if zahlu == '1' return '1 jahr' end if zahlu == '8' return '8' end if zahlu == '12' return '12' end if zahlu == '15' return '15 jahren' end if zahlu == '18' return '18 jahre' end if zahlu == '30' return '30 jahren' end  end 

but somehow, instead of getting correct variable 'for example: 1 jahr', variables printed out blank in view! know made wrong? thanks

und {jahrtag('',code.alter_o)}. here missing #

it should und #{jahrtag('',code.alter_o)}.


Comments

Popular posts from this blog

Unable to remove the www from url on https using .htaccess -