Class: RenderComponent

Inherits:
Puffer::Component::Base show all
Defined in:
app/components/render_component.rb

Instance Attribute Summary

Attributes inherited from Puffer::Component::Base

#field, #identifer, #opts, #parent_controller, #record, #records, #resource

Instance Method Summary collapse

Methods inherited from Puffer::Component::Base

#component_id, #event_options, #event_path, #event_url, #fallback_action, #initialize, #javascript_wrap, #method_for_action, #process, #render, #replace

Methods included from Puffer::Component::Base::ClassMethods

#controller_path

Constructor Details

This class inherits a constructor from Puffer::Component::Base

Instance Method Details

#action_missing(name) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'app/components/render_component.rb', line 3

def action_missing name
  case field.options[:render]
  when Symbol then
    view_context.send(field.options[:render])
  when Proc then
    field.options[:render].bind(view_context).call
  else ''
  end
end