Class: Thredded::SetupsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- Thredded::SetupsController
- Defined in:
- app/controllers/thredded/setups_controller.rb
Instance Method Summary collapse
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/thredded/setups_controller.rb', line 8 def create @messageboard = Messageboard.new() if signed_in? && @messageboard.save @topic = Topic.create!(topic_params) @post = Post.create!(post_params) redirect_to root_path else show_sign_in_error unless signed_in? render action: :new end end |
#new ⇒ Object
3 4 5 6 |
# File 'app/controllers/thredded/setups_controller.rb', line 3 def new show_sign_in_error unless signed_in? @messageboard = Messageboard.new end |