Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/hancock/routes.rb

Instance Method Summary collapse

Instance Method Details

#hancock_cms_routes(config = {}) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
# File 'lib/hancock/routes.rb', line 4

def hancock_cms_routes(config = {})
  routes_config = {
    root_path: "home#index"
  }
  routes_config.merge!(config)

  scope module: 'hancock' do

    if routes_config[:root_path]
      root to: routes_config[:root_path]
    end
  end

end