Method: ApplicationHelper#check_your_post_privilege
- Defined in:
- app/helpers/application_helper.rb
#check_your_post_privilege(post, privilege) ⇒ Boolean
Checks if the current user has a specified privilege on a post.
24 25 26 |
# File 'app/helpers/application_helper.rb', line 24 def check_your_post_privilege(post, privilege) !current_user.nil? && current_user&.has_post_privilege?(privilege, post) end |