Sha256: 95b76281f6fdfff0746ac9710a018b074788bcf4957428ded3f4550266a4a45a
Contents?: true
Size: 472 Bytes
Versions: 24
Compression:
Stored size: 472 Bytes
Contents
# frozen_string_literal: true module Thredded # @api private module NewPrivatePostParams protected def new_private_post_params params.fetch(:post, {}) .permit(:content, :quote_private_post_id) .tap do |p| quote_id = p.delete(:quote_private_post_id) if quote_id post = Thredded::PrivatePost.find(quote_id) authorize_reading post p[:quote_post] = post end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems