Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 756 Bytes

number.md

File metadata and controls

38 lines (29 loc) · 756 Bytes

Number Formatting

Number Row

show do
  attributes_table do
    # another attributes...
    number_row :amount, as: :currency
  end
end

Number Column

index do
  # another attributes...
  number_column :profit, as: :percentage
end

Options

If you want to customize the default number format, you can pass the same options passed to Rails NumberHelper methods. For example:

show do
  attributes_table do
    # another attributes...
    number_row :amount, as: :currency, unit: "R$", separator: ","
  end
end