Class: Thredded::PrivateTopicPreviewsController

Inherits:
ApplicationController show all
Includes:
NewPrivateTopicParams, RenderPreview
Defined in:
app/controllers/thredded/private_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/private_topic_previews_controller.rb', line 8

def preview
  form = Thredded::PrivateTopicForm.new(new_private_topic_params)
  @private_post = form.post
  @private_post.postable = form.private_topic
  render_preview
end