Added new controller and view to show tags grouped alphabetically

This commit is contained in:
Dani Macho
2014-10-26 08:22:25 +01:00
parent 7f078426c4
commit de7222ab8a
2 changed files with 12 additions and 2 deletions
+6
View File
@@ -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
+6 -2
View File
@@ -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