Rails: remove decimal from number_to_currency
Assuming that you want to skip decimals only in case of 0 cents, how about
number_to_currency(m.price, :locale => 'en_us').gsub(/\.00$/, "")
You can set the precision to 0 as documented here in the Rails API Docs.
number_to_currency(m.price, locale: :en, precision: 0)
Be aware that your prices will be rounded, anything from $38.50 to $39.49 will be displayed as $39.
Edit: Exchanged locale :en_us
for :en
, which might be enabled in more apps.