Module: ActiveComponent::Renderable
- Included in:
- Base
- Defined in:
- lib/active_component/renderable.rb
Instance Method Summary collapse
Instance Method Details
#render_component(type, args = {}) ⇒ Object
18 19 20 21 22 23 24 25 26 |
# File 'lib/active_component/renderable.rb', line 18 def render_component(type, args={}) raise_errors(type, args) if type.nil? or args.nil? unless args[:collection].present? element(type, args) else collection(type, args[:collection], args[:as], args[:locals]) end end |