Class: MongoidForums::Admin::ForumsController
- Inherits:
-
BaseController
- Object
- BaseController
- MongoidForums::Admin::ForumsController
- Defined in:
- app/controllers/mongoid_forums/admin/forums_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
10 11 12 13 14 15 16 17 18 |
# File 'app/controllers/mongoid_forums/admin/forums_controller.rb', line 10 def create if @forum = Forum.create(name: params[:forum][:name], category: params[:forum][:category]) flash[:notice] = "Category created successfully" redirect_to @forum else flash.now.alert = "Category could not be created" render :action => "new" end end |
#destroy ⇒ Object
26 27 |
# File 'app/controllers/mongoid_forums/admin/forums_controller.rb', line 26 def destroy end |
#edit ⇒ Object
20 21 |
# File 'app/controllers/mongoid_forums/admin/forums_controller.rb', line 20 def edit end |
#new ⇒ Object
6 7 8 |
# File 'app/controllers/mongoid_forums/admin/forums_controller.rb', line 6 def new @forum = Forum.new end |
#update ⇒ Object
23 24 |
# File 'app/controllers/mongoid_forums/admin/forums_controller.rb', line 23 def update end |