0
私はこのsimple_formSimple_formスタイルcollection_labelの
<%= simple_form_for(@order) do |f| %>
<%= f.error_notification %>
<%= f.association :orderstatus, :label => false, :include_blank => false, :input_html => { :class => 'order-status' } , :as => :radio, :label_html => { :style => "background-color:black;" } %>
<%= f.button :submit, :value => 'Update', :class => 'button grey small' %>
<% end %>
を持っており、それは、この作成されます。私も、私は、各ステータスのしたい背景色の進コードであるフィールドcolor
を持っているデータベースでhttp://d.pr/9Bqdを。この16進コードを各背景ラベルの色にどのように渡すか考えてみましょうか?私は何時間も試しました。そうでない場合