Method: AutoViewModel::Base#method_missing

Defined in:
lib/auto_view_model/base.rb

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

View models should support helper methods available in the template. By delegating missing methods to view context, we can support all existing Rails and application defined helpers.



20
21
22
23
24
25
26
# File 'lib/auto_view_model/base.rb', line 20

def method_missing(method, *args, &block)
  if @view_context.respond_to?(method)
    @view_context.public_send(method, *args, &block)
  else
    super
  end
end