Class: ActionDispatch::Routing::Mapper
- Inherits:
-
Object
- Object
- ActionDispatch::Routing::Mapper
- Defined in:
- lib/enjoy/search/routes.rb
Instance Method Summary collapse
Instance Method Details
#enjoy_cms_search_routes(config = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/enjoy/search/routes.rb', line 4 def enjoy_cms_search_routes(config = {}) routes_config = { use_search_path: true } routes_config.merge!(config) scope module: 'enjoy' do scope module: 'search' do if routes_config[:use_search_path] get 'search/(:q)(/page/:page)' => 'search#index', as: :enjoy_search end end end end |