Commit graph

7 commits

Author SHA1 Message Date
Anna Buianova
784afdf41e
Routine rubocop fixes (#19254)
* Rubocop fixes

* Rubocop fixes

* Fixed rubocop violation

* Fixed policies rubocop violations

* More rubocop fixes
2023-03-24 14:37:44 +03:00
Joshua Wehner
5dee4a11c1
Allow trusted user to access response templates (#17978)
* Allow trusted user to access response templates

* Add request specs for trusted user templates

* WIP: was just investigating...

* Move permission check to authorizer

* Revert "WIP: was just investigating..."

This reverts commit c38c60f7ab19ce43c174729c2542a9041e9322e2.

* Improved accessibility

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-12 11:37:59 +02:00
Joshua Wehner
07e1364f54
Trusted users can view & use moderator response templates (#17867)
* Trusted users can use moderator response templates

* Iron out container reveal logic

* Explanatory comment on controller endpoint confusion
2022-06-16 14:05:49 +02:00
yheuhtozr
c4778d832e
app/controllers & decorators i18n (#16126)
* app/controllers (& decorators) i18n etc

* tidy key names

* update keys

* delete ja.yml

* delete an involved ja.yml

* fix for PR review

* fix for spec

* delete ja.yml
2022-02-03 13:35:56 -05:00
Michael Kohl
b06e9901d5
Add ApplicationRecord#errors_as_sentence (#8265)
* Add ApplicationRecord#errors_as_sentence

* Refactor existing uses

* Use errors as sentence more consistently
2020-06-04 16:02:41 +02:00
Andy Zhao
f5ec83653c
[deploy] Finalize and add response templates feature (#7068) 2020-04-16 15:53:29 -04:00
Andy Zhao
1a989bef07
[deploy] Add response templates to user settings (#6823)
* Add response templates controller, routes, and view

* Add response templates settings page

* Remove dead code

* Use proper variable oops

* Use proper indentation

* Use before action for checking current_user

* Remove index action temporarily

* Use url helpers for redirects

* Use form_with over form_tag and form_for

* Persist previous content if edit fails

* Use exists for performance

* Remove index spec and add CRUD specs

* Memoize @response_template

* Use workaround for sad paths b/c render doesn't work

* Refactor and extract permitted_attributes into var

* Use present over exists to preload into memory

* Use last over first

* Lint for codeclimate

* Use two redirects for happy and sad create path

* Remove proper index route oops

* Codeclimate comma sigh
2020-03-26 14:48:00 -04:00