Commit Graph

14 Commits

Author SHA1 Message Date
evazion
4cd0b2cbfe pundit: convert user feedbacks to pundit.
Allow users to delete feedbacks they've given to other users, not just
mods.
2020-03-20 18:03:00 -05:00
evazion
6a984de3d5 views: refactor page titles.
Refactor `page_title` helper to automatically include site name.
2020-01-25 01:52:18 -06:00
evazion
73a4d675c0 css: ensure dtext is always wrapped in .prose container.
Ensure dtext is always wrapped in a `<div class="prose">` or
`<span class="prose">` (for inline dtext) container so that dtext css is
properly applied.
2019-09-17 00:28:41 -05:00
evazion
59b277ead1 users: drop id_to_name, name_to_id caching.
Changes:

* Drop Users.id_to_name.
* Don't cache Users.name_to_id.
* Replace calls to name_to_id with find_by_name when possible.
* Don't autodefine creator_name in belongs_to_creator.
* Don't autodefine updater_name in belongs_to_updater.
* Instead manually define creator_name / updater_name only on models that need
  to return these fields in the api.

id_to_name was cached to reduce the impact of N+1 query patterns in
certain places, especially in api responses that return creator_name /
updater_name fields. But it still meant we were doing N calls to
memcache. Using `includes` to prefetch users avoids this N+1 pattern.

name_to_id had no need be cached, it was never used in any performance-
sensitive contexts.

Avoiding caching also avoids the need to keep these caches consistent.
2019-08-18 11:24:42 -05:00
Albert Yi
17ae357da9 eliminate mixpanel references 2019-01-23 16:37:44 -08:00
Albert Yi
b999fc86ea mixpanel fixes 2018-10-22 16:54:38 -07:00
evazion
7cb7c2fbab Remove ruby DText implementation (#3206). 2017-07-19 16:48:42 -05:00
Albert Yi
87bcc07fae enable ragel parser for remaining dtext endpoints 2017-01-10 15:12:37 -08:00
evazion
fa74c71b6d Prevent mods from editing/deleting feedbacks given to themselves. 2016-11-28 03:57:24 -06:00
r888888888
5e1dc81ab3 fixes #1634: Allow users to edit feedback they give out 2015-08-02 18:19:44 -07:00
Toks
92d6775e33 fixes #1529 2013-05-04 10:12:24 -04:00
小太
1a03a86592 Kill trailing whitespace in erb files 2013-03-19 23:11:58 +11:00
albert
34ae712be0 fixed titles 2011-10-23 16:55:57 -04:00
albert
98403d0cb7 fix user feedback controller test 2011-07-17 18:40:24 -04:00