Class: Refinery::News::ItemsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Refinery::News::ItemsController
- Defined in:
- app/controllers/refinery/news/items_controller.rb
Instance Method Summary collapse
Instance Method Details
#archive ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/refinery/news/items_controller.rb', line 16 def archive if params[:month].present? @archive_for_month = true @archive_date = Time.parse("#{params[:month]}/#{params[:year]}") @items = Item.archived.translated.by_archive(@archive_date).page(params[:page]) else @archive_date = Time.parse("01/#{params[:year]}") @items = Item.archived.translated.by_year(@archive_date).page(params[:page]) end end |
#index ⇒ Object
8 9 10 |
# File 'app/controllers/refinery/news/items_controller.rb', line 8 def index # render 'index' end |
#show ⇒ Object
12 13 14 |
# File 'app/controllers/refinery/news/items_controller.rb', line 12 def show # render 'show' end |