Sha256: 07791e7483e25eecc546273710b4e642deb15880f4e297fcaba80abdbc430894
Contents?: true
Size: 686 Bytes
Versions: 5
Compression:
Stored size: 686 Bytes
Contents
module MasterView module Directives class Submit < MasterView::DirectiveBase metadata :priority => :default, :category => 'form', :description => 'Replaces the element with a submit input element using the Rails submit_tag helper.', :element_usage => 'input' attr_arg :text do |x,args,inst| if (x and x.include?('=>')) : args.unshift(x); end; inst.quote(inst.element_attrs[:value]) end # if hash found push it back on, override with quoted element_attrs[:value] attr_arg :options, :append_element_attrs => [:common_html] event :element do render erb_content( 'submit_tag', :text, :options ) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems