Sha256: 7a3a56e493178c826af1be05ba3c108201a60710e7d7660b421ea770ae331676

Contents?: true

Size: 392 Bytes

Versions: 18

Compression:

Stored size: 392 Bytes

Contents

# frozen_string_literal: true

module Thredded
  # @api private
  module NewTopicParams
    protected

    def new_topic_params
      params
        .fetch(:topic, {})
        .permit(:title, :locked, :sticky, :content, category_ids: [])
        .merge(
          messageboard: messageboard,
          user: thredded_current_user,
          ip: request.remote_ip,
        )
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
threddedDANIEL-0.14.5 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.14.4 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.14.3 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.14.2 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.14.1 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.14.0 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.8 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.7 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.6 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.5 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.4 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.3 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.2 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.1 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.13.0 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.12.4 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.12.3 app/controllers/concerns/thredded/new_topic_params.rb
thredded-0.12.2 app/controllers/concerns/thredded/new_topic_params.rb