Sha256: bf06ce7d9c0df3427088c90c2896d4427f6a8e737427a0639e89f516982c3837
Contents?: true
Size: 784 Bytes
Versions: 5
Compression:
Stored size: 784 Bytes
Contents
module MasterView module Directives # creates a select helper. quotes object and method if necessary, merges # html options specfied on element into any html options in attr_value class Select < MasterView::DirectiveBase metadata :priority => :default, :category => 'form', :description => 'Replaces the element with a Rails select helper.', :element_usage => 'select' attr_arg :obj, :quote => true attr_arg :method, :quote => true attr_arg :choices, :default => [] attr_arg :options, :default => {} attr_arg :html_options, :append_element_attrs => [:common_html] event :element do render erb_content( 'select', :obj, :method, :choices, :options, :html_options ) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems