class CollectionCacheController

Attributes

partial_rendered_times[RW]

Public Instance Methods

index() click to toggle source
# File actionpack/test/controller/caching_test.rb, line 396
def index
  @customers = [Customer.new("david", params[:id] || 1)]
end
index_explicit_render_in_controller() click to toggle source
# File actionpack/test/controller/caching_test.rb, line 405
def index_explicit_render_in_controller
  @customers = [Customer.new("david", 1)]
  render partial: "customers/customer", collection: @customers, cached: true
end
index_ordered() click to toggle source
# File actionpack/test/controller/caching_test.rb, line 400
def index_ordered
  @customers = [Customer.new("david", 1), Customer.new("david", 2), Customer.new("david", 3)]
  render "index"
end
index_with_callable_cache_key() click to toggle source
# File actionpack/test/controller/caching_test.rb, line 415
def index_with_callable_cache_key
  @customers = [Customer.new("david", 1)]
  render partial: "customers/customer", collection: @customers, cached: -> customer { "cached_david" }
end
index_with_comment() click to toggle source
# File actionpack/test/controller/caching_test.rb, line 410
def index_with_comment
  @customers = [Customer.new("david", 1)]
  render partial: "customers/commented_customer", collection: @customers, as: :customer, cached: true
end