Sha256: 35beeb90814a08fa83b064ec1e6bd639e4a7ebbb986781616653c7c53db1deb2
Contents?: true
Size: 296 Bytes
Versions: 4
Compression:
Stored size: 296 Bytes
Contents
class ApplicationController < ActionController::Base def index @tweets = Tweet.all if eager_load? @tweets = @tweets.precount(:replies).preload(in_reply_to: :favorites_count) end end def eager_load? params[:eager_load] == 'true' end helper_method :eager_load? end
Version data entries
4 entries across 4 versions & 1 rubygems