diff options
author | Louise Crow <louise.crow@gmail.com> | 2012-09-12 18:17:07 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2012-09-12 18:17:07 +0100 |
commit | 63f76f802285701f4d3c5d0b0e5e915067bc6063 (patch) | |
tree | ba21f49fededc491f3b083103bffc81adad201a3 /app/models/info_request.rb | |
parent | 77a22824fb23bc25945adf2b96feb55b004bdb8a (diff) |
Add a counter cache for the number of info_requests associated with public bodies.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index f2d8929bc..ed54da840 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -35,7 +35,7 @@ class InfoRequest < ActiveRecord::Base belongs_to :user validate :must_be_internal_or_external - belongs_to :public_body + belongs_to :public_body, :counter_cache => true validates_presence_of :public_body_id has_many :outgoing_messages, :order => 'created_at' |