Sha256: 1f8da0dc924ace3922c847a1a2ca72434bb319ca6abad2284c91f0cc2b880e19
Contents?: true
Size: 537 Bytes
Versions: 24
Compression:
Stored size: 537 Bytes
Contents
# frozen_string_literal: true module Thredded # @api private module NewPrivateTopicParams protected def new_private_topic_params params .fetch(:private_topic, {}) .permit(:title, :content, :user_names, user_ids: []) .merge( user: thredded_current_user, ).tap { |p| adapt_user_ids! p } end private # Allow a string of IDs joined with commas. def adapt_user_ids!(p) p[:user_ids] = p[:user_ids].split(',') if p[:user_ids].is_a?(String) end end end
Version data entries
24 entries across 24 versions & 1 rubygems