2015-06-28 15:14:47 +00:00
|
|
|
class SeriesController < ApplicationController
|
2015-07-04 18:10:58 +00:00
|
|
|
include PreferencesHelper
|
|
|
|
|
|
|
|
before_action :preferences, only: :index
|
2015-06-28 15:14:47 +00:00
|
|
|
|
|
|
|
def show
|
|
|
|
@serie = Serie.find(params[:id])
|
|
|
|
@title = @serie.name
|
|
|
|
end
|
|
|
|
|
|
|
|
def index
|
2015-08-04 11:47:26 +00:00
|
|
|
@series = Serie.where(query_filter).order(:sort)
|
|
|
|
.paginate(page: params[:page], per_page: @preference.per_page)
|
2015-06-28 15:14:47 +00:00
|
|
|
@title = "Series"
|
2015-06-29 16:58:02 +00:00
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.js
|
|
|
|
end
|
2015-06-28 15:14:47 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|