lib/opencomponents/rails/renderer.rb
def render_component(component, opts = {})
      super(component, opts).html_safe
    rescue OpenComponents::RegistryTimeout
      config = ::Rails.application.config.opencomponents

      raise unless config.enable_client_failover

      oc_component_tag(component, opts)
    end
# Returns a rendered component.
#
#   render_component('my-component')
#   # => <oc-component href="http://localhost:3030/my-component">...</oc-component>
#
# Also accepts options for "params", "version", and "headers".
#
#   render_component('my-component',
#     params: {name: 'Zan'},
#     version: '1.0.2',
#     headers: {accept_language: 'emoji'}
#   )
#   # => <oc-component href="http://localhost:3030/my-component/1.0.2?name=Zan">...</oc-component>
#
# Raises an error if the registry request times out and client failover is
# disabled, otherwise will return an unrendered <oc-component> tag for
# client-side rendering.
Returns a rendered component.





Raises an error if the registry request times out and client failover is
disabled, otherwise will return an unrendered  tag for
client-side rendering.
Returns a rendered component . Raises an error if the registry request times out and client failover is disabled otherwise will return an unrendered tag for client - side rendering .
def render_component(component, opts = {})
      super(component, opts).html_safe
    rescue OpenComponents::RegistryTimeout
      config = ::Rails.application.config.opencomponents
      raise unless config.enable_client_failover
      oc_component_tag(component, opts)
    end
def render_component ( component , opts = { } ) super ( component , opts ) . html_safe rescue OpenComponents :: RegistryTimeout config = :: Rails . application . config . opencomponents raise unless config . enable_client_failover oc_component_tag ( component , opts ) end
Returns a rendered component.
Returns a rendered component .
component
opts