# File lib/merb_helpers/form_helpers.rb, line 317 def radio_group_control(col, options = [], attrs = {}) errorify_field(attrs, col) val = @_obj.send(col) ret = "" options.each do |opt| value, label = opt.is_a?(Hash) ? [opt.delete(:value), opt.delete(:label)] : [opt, opt] hash = {:name => "#{@_object_name}[#{col}]", :value => value, :label => label, :id => "#{control_id(col)}_#{value}" } hash.merge!(opt) if opt.is_a?(Hash) hash.merge!(:checked => "checked") if val.to_s == value.to_s ret << radio_field(hash) end ret end