Sha256: e1cdae23b6a8f7a8b82206e56d0b2289ad5cfa9c404a6ba26bd308635d6d69d9

Contents?: true

Size: 291 Bytes

Versions: 14

Compression:

Stored size: 291 Bytes

Contents

module HyperRouter
  class IsomorphicMethods
    include React::IsomorphicHelpers

    isomorphic_method(:request_fullpath) do |f|
      f.when_on_client { `window.location.pathname` }
      f.send_to_server
      f.when_on_server { f.context.controller.request.fullpath }
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
hyper-router-0.99.6 lib/hyper-router/isomorphic_methods.rb
hyper-router-0.99.5 lib/hyper-router/isomorphic_methods.rb
hyper-router-0.99.4 lib/hyper-router/isomorphic_methods.rb
hyper-router-0.99.3 lib/hyper-router/isomorphic_methods.rb
hyper-router-0.99.2 lib/hyper-router/isomorphic_methods.rb
hyper-router-0.99.1 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap28 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap27 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap26 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap25 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap24 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap23 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.2.6.lap22 lib/hyper-router/isomorphic_methods.rb
hyper-router-4.1.1 lib/hyper-router/isomorphic_methods.rb