diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index 872b347..610d270 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -7,4 +7,10 @@ class TagsController < ApplicationController respond_with @all_tags end + + def alpha_grouped_index + + @alpha_tags = Post::alphabetical_grouped_tags + respond_with @alpha_tags + end end diff --git a/config/routes.rb b/config/routes.rb index b06441a..dc1855e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -15,7 +15,7 @@ Timeoverflow::Application.routes.draw do resources :offers, concerns: :joinable do collection do get :dashboard - end + end end resources :inquiries, concerns: :joinable @@ -52,6 +52,10 @@ Timeoverflow::Application.routes.draw do post :accept end - resource :tags, only: [:index] + resource :tags, only: [:index] do + collection do + get "alpha_grouped_index" + end + end end