Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update routes in preparation for rails 8. #44

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
AhoyCaptain::Engine.routes.draw do
root to: 'roots#show'
%w{utm_source utm_medium utm_term utm_content utm_campaign}.each do |utm|
get "campaigns/#{utm}" => "campaigns#index", defaults: { campaigns_type: utm }, as: "campaign_#{utm}"
get "campaigns/#{utm}", to: "campaigns#index", defaults: { campaigns_type: utm }, as: "campaign_#{utm}"
end

{
browsers: :browser,
operating_systems: :os,
device_types: :device_type
}.each do |k,v|
get "/devices/#{k}" => 'devices#index', defaults: { devices_type: v }, as: "devices_#{k}"
get "/devices/#{k}", to: 'devices#index', defaults: { devices_type: v }, as: "devices_#{k}"
end

namespace :locations do
Expand Down Expand Up @@ -41,11 +41,11 @@
end
namespace :filters do
%w{source medium term content campaign}.each do |utm|
get "utm/#{utm}s" => "utms#index", defaults: { type: "utm_#{utm}" }
get "utm/#{utm}s", to: "utms#index", defaults: { type: "utm_#{utm}" }
end

%w{country region city}.each do |type|
get "locations/#{type.pluralize}" => "locations#index", defaults: { type: type }
get "locations/#{type.pluralize}", to: "locations#index", defaults: { type: type }
end

namespace :properties do
Expand Down