Sha256: fc1110c41936e05600f61616c3dcc427c7091296852eda7cc729476eb3efe93d
Contents?: true
Size: 386 Bytes
Versions: 5
Compression:
Stored size: 386 Bytes
Contents
# CytoRadio Helper # Choices should be of the syntax {:value => "label"} def CytoRadio(name,choices,value,options={}) options = Cytoplasm::addClass(options,"cytoRadio") options[:data] ||= {} value = choices.keys[0] if value.is_a? Hash output = "" choices.each do |v,l| o = options o[:data][:label] = l output += radio_button_tag(name,v.to_s,(value==v),o) end raw output end
Version data entries
5 entries across 5 versions & 1 rubygems