Skip to content

Commit

Permalink
Preis und Gewicht Formatierung
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRtz committed Feb 18, 2012
1 parent 6f4ad96 commit 1b343bb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions edelbiter/app/views/schokolade/_schokolade.haml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
.titel= link_to @post.titel, url_for(:archive, :show, :id => @post.id)
#infokasten
.kakao= 'Kakaogehalt: ' + @post.kakaogehalt.to_s + '%'
.preis= 'Preis: ' + @post.preis.to_s + ' EUR'
.inhalt= 'Packungsgewicht ' + @post.gewicht.to_s + 'g'
.preis= 'Preis: ' + sprintf("%.2f", @post.preis.to_s).sub(".",",") + ' EUR'
.inhalt= 'Packungsgewicht ' + sprintf("%.0f", @post.gewicht.to_s) + 'g'
.naehrwerte= 'Nährwerte (pro 100g): '
.kohy= 'Kohlenhydrate: ' + @post.kohlenhydrate.to_s + 'g'
.zucker= '...davon Zucker: ' + @post.zucker.to_s + 'g'
Expand Down

0 comments on commit 1b343bb

Please sign in to comment.