Created
December 31, 2015 14:50
-
-
Save mangar/b73711cb9506965a8cda to your computer and use it in GitHub Desktop.
Formatar numero (Rails) em valor monetário (R$) ... dentro de um controller, por exemplo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def formatar_valor_BRL(valor) | |
| ActionController::Base.helpers.number_to_currency(valor, :unit => "R$ ", :separator => ",", :delimiter => ".") | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment