diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-07-31 18:35:44 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2013-09-16 12:25:23 +0100 |
commit | 49c346c1eecc4b785bf341e2746b7b458319d7bb (patch) | |
tree | dda0e7d03c5db8aa7d77ee4f0ac445e6a4a018b6 /app/models/info_request.rb | |
parent | 201a7e7f1850378384975c548b7e1753a26070d7 (diff) |
Rename method to make it a bit more generic
A super user will be able to see all hidden things, not just requests.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index c9bcc9bab..ad210c6fc 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -1019,7 +1019,7 @@ public def user_can_view?(user) if self.prominence == 'hidden' - return User.view_hidden_requests?(user) + return User.view_hidden?(user) end if self.prominence == 'requester_only' return self.is_owning_user?(user) @@ -1106,10 +1106,10 @@ public begin if self.described_state.nil? self.described_state = 'waiting_response' - end + end rescue ActiveModel::MissingAttributeError # this should only happen on Model.exists?() call. It can be safely ignored. - # See http://www.tatvartha.com/2011/03/activerecordmissingattributeerror-missing-attribute-a-bug-or-a-features/ + # See http://www.tatvartha.com/2011/03/activerecordmissingattributeerror-missing-attribute-a-bug-or-a-features/ end # FOI or EIR? if !self.public_body.nil? && self.public_body.eir_only? |