Class: Thredded::TopicPreviewsController

Inherits:
ApplicationController show all
Includes:
NewTopicParams, RenderPreview
Defined in:
app/controllers/thredded/topic_previews_controller.rb

Instance Method Summary collapse

Methods included from UrlsHelper

#delete_post_path, #edit_post_path, #edit_preferences_path, #edit_preferences_url, #mark_unread_path, #permalink_path, #post_path, #post_url, #quote_post_path, #search_path, #topic_path, #topic_url, #user_path

Instance Method Details

#previewObject



8
9
10
11
12
13
# File 'app/controllers/thredded/topic_previews_controller.rb', line 8

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