Refactored items_per_page. Start on admin/workgroups.

This commit is contained in:
benni 2011-06-10 12:18:55 +02:00
parent 689cfcfe01
commit 6ddef7267a
13 changed files with 35 additions and 119 deletions

View file

@ -2,12 +2,6 @@ class ArticlesController < ApplicationController
before_filter :authenticate_article_meta, :find_supplier
def index
if (params[:per_page] && params[:per_page].to_i > 0 && params[:per_page].to_i <= 500)
@per_page = params[:per_page].to_i
else
@per_page = 30
end
if params['sort']
sort = case params['sort']
when "name" then "articles.name"