diff options
author | Louise Crow <louise.crow@gmail.com> | 2015-05-26 16:08:41 +0100 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2015-05-26 16:08:41 +0100 |
commit | 6a26a283902679b24bf9b4b8f90e3becf75f5310 (patch) | |
tree | 81a93226ff36b696473e62c756e6f9f970d2a64c | |
parent | 2ad18cc8610f6e17731acd388d8c3cdaae0de004 (diff) |
Restore methods with deprecation notices
-rw-r--r-- | app/models/info_request.rb | 6 | ||||
-rw-r--r-- | app/models/user.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 92cb4b208..dae7b08c8 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -212,6 +212,12 @@ class InfoRequest < ActiveRecord::Base OLD_AGE_IN_DAYS = 21.days + def visible_comments + warn %q([DEPRECATION] InfoRequest#visible_comments will be replaced with + InfoRequest#comments.visible as of 0.23).squish + comments.visible + end + # If the URL name has changed, then all request: queries will break unless # we update index for every event. Also reindex if prominence changes. after_update :reindex_some_request_events diff --git a/app/models/user.rb b/app/models/user.rb index df12b823b..d50000aba 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -197,6 +197,12 @@ class User < ActiveRecord::Base (locale || I18n.locale).to_s end + def visible_comments + warn %q([DEPRECATION] User#visible_comments will be replaced with + User#comments.visible as of 0.23).squish + comments.visible + end + # Don't display any leading/trailing spaces # TODO: we have strip_attributes! now, so perhaps this can be removed (might # be still needed for existing cases) |