add: home index controllers
This commit is contained in:
parent
94075717e2
commit
385f45ddde
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::ActivityForumsController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@activity_forums = kaminari_paginate(Topic::ActivityForum)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::BannersController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@banners = kaminari_paginate(Topic::Banner)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,3 @@
|
||||||
|
class Topic::BaseController < ApplicationController
|
||||||
|
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::CardsController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@cards = kaminari_paginate(Topic::Card)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::CooperatorsController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@cooperators = kaminari_paginate(Topic::Cooperator)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::ExcellentProjectsController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@excellent_projects = kaminari_paginate(Topic::ExcellentProject)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::ExperienceForumsController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@experience_forums = kaminari_paginate(Topic::ExperienceForum)
|
||||||
|
end
|
||||||
|
end
|
|
@ -0,0 +1,6 @@
|
||||||
|
class Topic::PinnedForumsController < Topic::BaseController
|
||||||
|
|
||||||
|
def index
|
||||||
|
@pinned_forums = kaminari_paginate(Topic::PinnedForum)
|
||||||
|
end
|
||||||
|
end
|
|
@ -24,6 +24,16 @@ Rails.application.routes.draw do
|
||||||
resources :edu_settings
|
resources :edu_settings
|
||||||
|
|
||||||
scope '/api' do
|
scope '/api' do
|
||||||
|
namespace :topic do
|
||||||
|
resources :activity_forums, only: [:index]
|
||||||
|
resources :banners, only: [:index]
|
||||||
|
resources :cards, only: [:index]
|
||||||
|
resources :cooperators, only: [:index]
|
||||||
|
resources :excellent_projects, only: [:index]
|
||||||
|
resources :experience_forums, only: [:index]
|
||||||
|
resources :pinned_forums, only: [:index]
|
||||||
|
end
|
||||||
|
|
||||||
namespace :ci do
|
namespace :ci do
|
||||||
resources :languages, only: [:index, :show] do
|
resources :languages, only: [:index, :show] do
|
||||||
collection do
|
collection do
|
||||||
|
|
Loading…
Reference in New Issue