Class: ThinkFeelDoEngine::BitMaker::ContentModulesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- ApplicationController
- ThinkFeelDoEngine::BitMaker::ContentModulesController
- Defined in:
- app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb
Overview
Enables users to create, update, and delete modules These modules contain providers that display content to the participants
Constant Summary
Constants inherited from ApplicationController
ApplicationController::CSRF_COOKIE_NAME, ApplicationController::CSRF_HEADER_NAME, ApplicationController::INACTIVE_MESSAGE, ApplicationController::ROOT_URI
Instance Method Summary collapse
-
#create ⇒ Object
POST /content_modules.
-
#destroy ⇒ Object
DELETE /content_modules/1.
-
#edit ⇒ Object
GET /content_modules/1/edit.
-
#index ⇒ Object
GET /content_modules.
-
#new ⇒ Object
GET /content_modules/new.
-
#show ⇒ Object
GET /content_modules/1.
-
#update ⇒ Object
PATCH/PUT /content_modules/1.
Methods inherited from ApplicationController
#access_denied_resource_path, #after_sign_in_path_for, #after_sign_out_path_for, #raise_not_found!, #render_not_found
Instance Method Details
#create ⇒ Object
POST /content_modules
34 35 36 37 38 39 40 41 42 43 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 34 def create @content_module = BitCore::ContentModule.new(content_module_params) if @content_module.save redirect_to arm_bit_maker_content_module_path(@arm, @content_module), notice: "Content module was successfully created." else render :new end end |
#destroy ⇒ Object
DELETE /content_modules/1
56 57 58 59 60 61 62 63 64 65 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 56 def destroy if content_module_destroyed redirect_to arm_bit_maker_content_modules_path(@arm), notice: "Content module along with any\ associated tasks were successfully destroyed." else redirect_to arm_bit_maker_content_modules_path(@arm), alert: "There were errors" end end |
#edit ⇒ Object
GET /content_modules/1/edit
30 31 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 30 def edit end |
#index ⇒ Object
GET /content_modules
15 16 17 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 15 def index :index, BitCore::ContentModule end |
#new ⇒ Object
GET /content_modules/new
24 25 26 27 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 24 def new @content_module = BitCore::ContentModule.new :create, @content_module end |
#show ⇒ Object
GET /content_modules/1
20 21 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 20 def show end |
#update ⇒ Object
PATCH/PUT /content_modules/1
46 47 48 49 50 51 52 53 |
# File 'app/controllers/think_feel_do_engine/bit_maker/content_modules_controller.rb', line 46 def update if @content_module.update(content_module_params) redirect_to arm_bit_maker_content_module_path(@arm, @content_module), notice: "Content module was successfully updated." else render :edit end end |