現在、formtasticで3つのラジオボタンを出力しています。
<label for="exercise_log_entries_attributes_0_difficulty_medium">
<input checked="checked" class="custom radio" data-placeholder="Difficulty" id="exercise_log_entries_attributes_0_difficulty_medium" name="exercise[log_entries_attributes][0][difficulty]" type="radio" value="Medium">
Medium
</label>
「中」をカスタムクラスでラップしたい。これどうやってするの?
答えを見つけました:
使用する必要がありますmember_label
:
member_label: Proc.new {|a| "<span class='custom radio'>#{a}</span>".html_safe}