Class: DynamicScaffold::Form::Item::TwoOptionsWithBlock

Inherits:
TwoOptions
  • Object
show all
Defined in:
lib/dynamic_scaffold/form/item/two_options_with_block.rb

Instance Attribute Summary

Attributes inherited from Base

#multiple, #name, #parent_item

Instance Method Summary collapse

Methods inherited from TwoOptions

#initialize

Methods inherited from Base

create, #default, #default_value, #errors, #extract_parameters, #if, #initialize, #insert, #label, #label?, #needs_rendering?, #note, #notes?, #proxy, #proxy_field, #render_label, #render_notes, #type?, #unique_name, #unless

Constructor Details

This class inherits a constructor from DynamicScaffold::Form::Item::TwoOptions

Instance Method Details

#render(view, form, classnames = nil) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/dynamic_scaffold/form/item/two_options_with_block.rb', line 7

def render(view, form, classnames = nil)
  form.public_send(
    @type,
    @name,
    *build_args(view, @args),
    @options,
    build_html_attributes(classnames)
  ) do |builder|
    yield builder
  end
end