diff options
-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) |