私は右揃えと桁区切り記号を使用したいと思います。誰かが私を正しい方向に向けることができますか?Rails ActiveAdminインデックスの書式設定番号
ActiveAdmin.register Thing do
index do
column :id
column :amount # need to make this fomatted nicely
default_actions
end
end
私は右揃えと桁区切り記号を使用したいと思います。誰かが私を正しい方向に向けることができますか?Rails ActiveAdminインデックスの書式設定番号
ActiveAdmin.register Thing do
index do
column :id
column :amount # need to make this fomatted nicely
default_actions
end
end
ブロックを列に渡すことができます。
column :amount do |thing|
div :class => "amount" do
number_to_currency thing.amount
end
end
CSS
.amount {
text-align :right;
}
このrailscastはかなり良い情報を通じて代わりにすぎhttp://railscasts.com/episodes/284-active-admin?view=asciicast
を行く:あなたのCSSで、その後
column :amount, :class => 'text-right' do |thing|
number_to_currency thing.amount
end
.text-right { text-align: right;}
あなたはUI
https://github.com/platanus/activeadmin_addons/blob/master/docs/number-formatting.md
を向上させるために Active Admin Addons gemを使用することができます