8.6 Playtime 8.4 Iteration C4: Functional Testing
Turn on caching in development
edit config/environments/development.rb
config.action_controller.perform_caching = true
add a method to return the latest product
edit app/models/product.rb
def self.latest
Product.order(:updated_at).last
end
Turn caching back off
edit config/environments/development.rb
config.action_controller.perform_caching = false
rm -f public/assets/*
rm -rf tmp/*cache/*