Ruby 1.9.2
Rails 3 --pre

db:
price decimal 6,2

view:
number_to_euro(@location.price) 

helper:
def number_to_euro(number)
    number_to_currency(number, {:unit => "€", :separator => ",", :format 
=> "%n %u"})
 end

#=>nil can't be coerced into Fixnum

oder number_to_currency @location.price
number_to_currency 1234567.5

#=>nil can't be coerced into Fixnum

mit rails 2.8 keine Probleme..

kann mir jemand eine Tipp geben..?


Werner Laude
http://www.webagentur-laude.de





_______________________________________________
rubyonrails-ug mailing list
[email protected]
http://mailman.headflash.com/listinfo/rubyonrails-ug

Antwort per Email an