Sha256: 0b071f71e46a3d0249d90e600a8da1937da255c862370ee0b35ae292f701a0cc

Contents?: true

Size: 471 Bytes

Versions: 17

Compression:

Stored size: 471 Bytes

Contents

# frozen_string_literal: true

module Thredded
  class TopicPreviewsController < Thredded::ApplicationController
    include Thredded::NewTopicParams
    include Thredded::RenderPreview

    before_action :thredded_require_login!
    after_action :verify_authorized

    def preview
      form = Thredded::TopicForm.new(new_topic_params)
      authorize_creating form.topic
      @post = form.post
      @post.postable = form.topic
      render_preview
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
thredded-1.1.0 app/controllers/thredded/topic_previews_controller.rb
thredded-1.0.1 app/controllers/thredded/topic_previews_controller.rb
thredded-1.0.0 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.16 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.15 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.14 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.13 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.12 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.11 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.10 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.9 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.8 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.7 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.6 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.5 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.4 app/controllers/thredded/topic_previews_controller.rb
thredded-0.16.3 app/controllers/thredded/topic_previews_controller.rb