Sha256: 7f768a71770e723100f48dac14ebdc645edd9c43598fb2b48ec3f30de992cef1
Contents?: true
Size: 434 Bytes
Versions: 24
Compression:
Stored size: 434 Bytes
Contents
# frozen_string_literal: true module Thredded # @api private module NewPostParams protected def new_post_params params.fetch(:post, {}) .permit(:content, :quote_post_id) .tap do |p| quote_id = p.delete(:quote_post_id) if quote_id post = Thredded::Post.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