Permalink
Browse files

#351: small refactoring

  • Loading branch information...
avokhmin committed Feb 12, 2014
1 parent 7809f75 commit a26a44781d009cbfa83e80332318fb07edcc8315
Showing with 2 additions and 3 deletions.
  1. +2 −3 app/controllers/advisories_controller.rb
@@ -5,9 +5,8 @@ class AdvisoriesController < ApplicationController
authorize_resource
def index
- @advisories = @advisories.scoped(include: :platforms)
- @advisories = @advisories.search(params[:q]) if params[:q]
- @advisories = @advisories.uniq.paginate(page: params[:page])
+ @advisories = @advisories.includes(:platforms).search(params[:q]).
+ uniq.paginate(page: params[:page])
respond_to do |format|
format.html
format.atom

0 comments on commit a26a447

Please sign in to comment.