Sha256: 89ff05b1813ffee1d40c97e1ed47c1b50c2efd2f074097f87935995e0cce18cd
Contents?: true
Size: 567 Bytes
Versions: 14
Compression:
Stored size: 567 Bytes
Contents
# frozen_string_literal: true module Thredded # @api private module NewPrivateTopicParams protected def new_private_topic_params params .require(:private_topic) .permit(:title, :content, :user_names, user_ids: []) .merge( user: thredded_current_user, ip: request.remote_ip ).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
14 entries across 14 versions & 1 rubygems