class HomeController < ApplicationController
  def home
    @filter  = CollectionFilter.new(current_user, LightweightActivity, params[:filter] || {})
    # TODO: Add 'oficial' to the criteron?
    @activities = @filter.collection.first(10)
    @filter.klass = Sequence
    # TODO: Add 'oficial' to the criteron?
    @sequences  = @filter.collection.first(10)
  end
end

class HomeController < ApplicationController
  def home
    @filter  = CollectionFilter.new(current_user, LightweightActivity, params[:filter] || {})
    # TODO: Add 'oficial' to the criteron?
    @activities = @filter.collection.includes(:user,:changed_by,:portal_publications,:runs).first(10)
    @filter.klass = Sequence
    # TODO: Add 'oficial' to the criteron?
    @sequences  = @filter.collection.includes(:user,:lightweight_activities).first(10)
  end
end

Fix some N+1 queries on the home page.
Fix some N+1 queries on the home page.
