Module: Minimal::Template::FormBuilderProxy

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

Defined Under Namespace

Classes: Proxy

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



15
16
17
18
19
20
21
# File 'lib/minimal/template/form_builder_proxy.rb', line 15

def method_missing(method, *args, &block)
  if [:form_for, :fields_for].include?(method)
    self << view.send(method, *args) { |builder| yield(Proxy.new(self, builder)) }
  else
    super
  end
end