Module: React::Router::Rails::ViewHelper

Defined in:
lib/react/router/rails/view_helper.rb

Instance Method Summary collapse

Instance Method Details

#react_router(routes, location = 'HashLocation', &block) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/react/router/rails/view_helper.rb', line 5

def react_router(routes, location = 'HashLocation', &block)
  html_options = {
    :'data-react-router-class' => routes,
    :'data-react-router-location' => location
  }
  
  (:div, '', html_options, &block)
end