Sha256: 1b264a3e2d72c0eb7ca7d14d6a921d31c7781edb89b5304c5bc52f909a8d644c

Contents?: true

Size: 523 Bytes

Versions: 1

Compression:

Stored size: 523 Bytes

Contents

module React
  # adds router_handler method, and overrides the built_in tag method
  module Component
    def route_handler(*args)
      Router::RR::RouteHandler(*args)
    end

    class << self
      alias _reactrb_router_original_included included
      def included(base)
        _reactrb_router_original_included(base)
        base.define_method :link do |opts = {}, &block|
          opts[:params] = opts[:params].to_n if opts[:params]
          Router::RR::Link(opts, &block)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
reactrb-router-0.8.2 lib/reactrb-router/component.rb