Class: Admin::NewsController
- Inherits:
-
AdminController
- Object
- ActionController::Base
- PagesCore::BaseController
- ApplicationController
- PagesCore::AdminController
- AdminController
- Admin::NewsController
- Defined in:
- app/controllers/admin/news_controller.rb
Instance Attribute Summary
Attributes included from PagesCore::Authentication
Instance Method Summary collapse
Methods inherited from PagesCore::AdminController
Methods included from PagesCore::StaticCacheController
#disable_static_cache!, #static_cached?
Methods included from PagesCore::PoliciesHelper
#policy, #verify_policy, #verify_policy_with_proc
Methods included from PagesCore::ProcessTitler
inc_number_of_requests, original_title
Methods included from PagesCore::LocalesHelper
Methods included from PagesCore::ErrorRenderer
Methods included from PagesCore::Authentication
#authenticate!, #deauthenticate!, #logged_in?
Instance Method Details
#index ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/controllers/admin/news_controller.rb', line 11 def index @archive_finder = archive_finder(@news_pages, content_locale) unless @year redirect_to(admin_news_index_path(content_locale, (@archive_finder.latest_year || Time.zone.now.year))) return end @pages = @archive_finder.by_year_and_maybe_month(@year, @month) .paginate(per_page: 50, page: params[:page]) end |