module MasterView module Directives # create radio_button helper, quoting object and method if necessary # merging in any html options specified class RadioButton < MasterView::DirectiveBase metadata :priority => :default, :category => 'form', :description => 'Replaces the element with a Rails radio_button helper.', :element_usage => 'input' attr_arg :name, :quote => true attr_arg :method, :quote => true attr_arg :value attr_arg :options, :append_element_attrs => [:common_html] event :element do render erb_content( 'radio_button', :name, :method, :value, :options ) end end end end