Commit e378a4287ce4e102412a7d727818cfe33eddc5d3

Authored by Braulio Bhavamitra
1 parent 5ccd10bb

Remove load_category from app controller

It will be readded later where it is used: on the search controller
app/controllers/application.rb
... ... @@ -166,14 +166,4 @@ class ApplicationController < ActionController::Base
166 166 render :template => 'shared/access_denied.rhtml', :status => 403
167 167 end
168 168  
169   - def load_category
170   - unless params[:category_path].blank?
171   - path = params[:category_path].join('/')
172   - @category = environment.categories.find_by_path(path)
173   - if @category.nil?
174   - render_not_found(path)
175   - end
176   - end
177   - end
178   -
179 169 end
... ...
app/models/category_finder.rb
... ... @@ -40,15 +40,6 @@ class CategoryFinder
40 40 end
41 41 end
42 42  
43   - def recent(asset, limit = nil)
44   - find(asset, nil, :limit => limit, :order => 'created_at DESC, id DESC')
45   - end
46   -
47   - def most_commented_articles(limit=10, options={})
48   - options = {:page => 1, :per_page => limit, :order => 'comments_count DESC'}.merge(options)
49   - Article.paginate(:all, options_for_find(Article, options))
50   - end
51   -
52 43 def current_events(year, month, options={})
53 44 options.delete(:page)
54 45 options.delete(:per_page)
... ...