Class: Thredded::PostPreviewsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Thredded::PostPreviewsController
- Includes:
- RenderPreview
- Defined in:
- app/controllers/thredded/post_previews_controller.rb
Instance Method Summary collapse
-
#preview ⇒ Object
Preview a new post.
-
#update ⇒ Object
Preview an update to an existing post.
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
#preview ⇒ Object
Preview a new post
8 9 10 11 12 |
# File 'app/controllers/thredded/post_previews_controller.rb', line 8 def preview @post = Thredded::Post.new(post_params) @post.postable = Thredded::Topic.friendly_find!(params[:topic_id]) render_preview end |