docbrown/app/helpers/users_helper.rb
Joshua Wehner 8086ef68ac
Fix bullet issue with includes commentable (#19145)
* Fix bullet issue with includes commentable

* Flatten view logic

* Restore user comment section logic (but bullet-friendly)

* Try fixing podcast_episode -> podcast

* Add test that would have caught the logic bug

* View specs need describe to specific the path

* Remove unnecessary _comments argument

* Ooops, missed saving this
2023-03-20 16:08:03 +01:00

12 lines
277 B
Ruby

module UsersHelper
USER_COMMENTS_PARTIAL = "users/comments_section".freeze
COMMENTS_LOCKED_PARTIAL = "users/comments_locked_cta".freeze
def user_comments_section
if user_signed_in?
USER_COMMENTS_PARTIAL
else
COMMENTS_LOCKED_PARTIAL
end
end
end