aboutsummaryrefslogtreecommitdiffstats
path: root/spec/controllers/info_request_batch_controller_spec.rb
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2015-05-05 18:16:21 +0100
committerGareth Rees <gareth@mysociety.org>2015-05-07 15:53:14 +0100
commit44be6f9014728c83adbc582baaba29c231365643 (patch)
tree8d1ddb1016509630a87d3ea9d742d5bae330bfea /spec/controllers/info_request_batch_controller_spec.rb
parent8068b389a0c3118eeb13148021bd064b9226a9e3 (diff)
Use existing attribute
`last_event_time` is set as a result of calling `InfoRequest.find_in_state`. This commit adds an explicit accessor that converts it to a `DateTime` and uses it in the view, preventing an extra query for each `InfoRequest` in the result set. Before: Completed 200 OK in 14908.9ms (Views: 14625.3ms | ActiveRecord: 69.8ms) After: Completed 200 OK in 2481.0ms (Views: 2437.1ms | ActiveRecord: 5.2ms)
Diffstat (limited to 'spec/controllers/info_request_batch_controller_spec.rb')
0 files changed, 0 insertions, 0 deletions