Class: News::AdministrationController
- Inherits:
-
NewsController
- Object
- ActionController::Base
- ApplicationController
- NewsController
- News::AdministrationController
- Defined in:
- app/controllers/news/administration_controller.rb
Overview
This is a top-level class documentation comment for the Administration Controller
POST/PATCH is still handled in NewController
Constant Summary
Constants included from ProjectsHelper
ProjectsHelper::CLASSIFIER, ProjectsHelper::CLASSIFIER_ANNOTATION
Instance Method Summary collapse
-
#index ⇒ Object
GET /news or /news.json.
- #show ⇒ Object
Methods inherited from NewsController
#api_index, #api_show, #create, #destroy, #edit, #list, #new, #news_params, #set_news, #types, #update
Methods included from RedirectHelper
Methods included from RequestType
Methods included from LogRecent
Methods included from Cookies
#digest_cookie, #digested_cookie_exists?
Methods included from Whitelist
Methods included from ProjectsHelper
#cumulative_gb_per_year, #cumulative_projects_created_per_year, #document_cumulative_gb_per_year, #document_gb_per_year, #gb_per_year, #image_cumulative_gb_per_year, #image_gb_per_year, #invalid_object, #project_classification, #project_initials, #project_link, #project_login_link, #project_matches, #project_tag, #projects_list, #projects_search_form, #sound_cumulative_gb_per_year, #sound_gb_per_year, #taxonworks_classification, #week_in_review_graphs
Methods included from Api::Intercept
Methods included from TokenAuthentication
#intercept_project, #intercept_user, #intercept_user_or_project, #project_token_authenticate, #token_authenticate
Instance Method Details
#index ⇒ Object
GET /news or /news.json
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/news/administration_controller.rb', line 11 def index respond_to do |format| format.json { @news = News::Administration .page(params[:page]) .per(params[:per]) .order(:display_start, :created_at) @news = @news.where(type: params[:type]) if params[:type].present? } end render '/news/index' end |
#show ⇒ Object
26 27 28 29 |
# File 'app/controllers/news/administration_controller.rb', line 26 def show @news = News::Administration.find(params[:id]) render '/news/show' end |