ここで何が間違っていますか:
def radio_button(label, *args)
options = args.extract_options!
collection = options[:collection]
options.delete :collection
# put back into args to pass to super
args << options
collection.each do |item|
label(label, class: "radio-inline") do
super(label, item, *args) do
item.to_s.humanize
end
end
end
end
私はそれを呼んでいます
= f.radio_button :receiving_treatment, collection: ["yes", "no"], required: true
[「はい」、「いいえ」]を出力するだけです