Sha256: 47307097e737874fffbbcf3ab2675a8d5cb30b138c8dba966a14b7dc53aa39bb
Contents?: true
Size: 463 Bytes
Versions: 14
Compression:
Stored size: 463 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) .merge(ip: request.remote_ip).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
14 entries across 14 versions & 2 rubygems