Commit graph

6 commits

Author SHA1 Message Date
Jeremy Friesen
973ff20eb8
Refactoring to consolidate logic (#15851)
* Refactoring to consolidate logic

Prior to this commit, two controllers had nearly identical chunks of
logic.  This refactor extracts the logic to a common and more canonical
location.

* Addressing rubocop's aggressive auto-fix

* Adding spat operator for pluck

* Renaming method for greater clarity
2021-12-29 11:08:04 -05:00
Jeremy Friesen
5ee8764749
Factoring code to define Article.approved (#15600)
As I'm working on #15359 I wanted to favor using scopes over the raw
`where(approved: true)`.
2021-12-01 22:45:32 -05:00
Michael Kohl
a86c178fe0
Split Settings::Campaign from SiteConfig (#13238) 2021-04-19 10:01:03 +07:00
leewynne
58efe300ac
generalise sidebar campaign published article timeframe (#12278) 2021-01-19 08:40:39 -06:00
Ben Halpern
e5cbfe61f4
Add campaign articles to sidebar controller (#11879)
* Add campaign articles to sidebar controller

* Fix sidebar additional erb logic
2020-12-13 19:44:17 -05:00
benhalpern
ae7c9a4f75 Fetch homepage right sidebar async (and don't fetch for narrow screens) 2020-12-13 18:41:47 -05:00