Module: Thredded::PostAttachments::TopicActions
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/thredded/post_attachments.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/thredded/post_attachments.rb', line 35 def create @new_topic = Thredded::TopicForm.new(self.new_topic_params) @new_topic.topic if @new_topic.save post = @new_topic.topic.posts.last redirect_to post_path(post, user: thredded_current_user) else render :new end end |