Module: Minimal::Template::FormBuilderProxy

Defined in:
lib/minimal/template/form_builder_proxy.rb

Defined Under Namespace

Classes: Proxy

Constant Summary collapse

PROXY_TAGS =
[:form_for, :fields_for]

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/minimal/template/form_builder_proxy.rb', line 23

def method_missing(method, *args, &block)
  if PROXY_TAGS.include?(method)
    self << view.send(method, *args) do |builder|
      yield(Proxy.new(self, builder))
    end
  else
    super
  end
end