class ActionDispatch::Routing::Mapper

Public Instance Methods

hancock_cms_routes(config = {}) click to toggle source
# 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