Class: Gamification::ItemTypesController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Gamification::ItemTypesController
- Defined in:
- app/controllers/gamification/item_types_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /gamification/item_types.
-
#destroy ⇒ Object
DELETE /gamification/item_types/1.
-
#edit ⇒ Object
GET /gamification/item_types/1/edit.
-
#index ⇒ Object
GET /gamification/item_types.
-
#new ⇒ Object
GET /gamification/item_types/new.
-
#show ⇒ Object
GET /gamification/item_types/1.
-
#update ⇒ Object
PATCH/PUT /gamification/item_types/1.
Instance Method Details
#create ⇒ Object
POST /gamification/item_types
24 25 26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/gamification/item_types_controller.rb', line 24 def create :create, @gamification_item_type @gamification_item_type = Gamification::ItemType.new(gamification_item_type_params) if @gamification_item_type.save redirect_to @gamification_item_type, notice: 'Item type was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /gamification/item_types/1
46 47 48 49 |
# File 'app/controllers/gamification/item_types_controller.rb', line 46 def destroy @gamification_item_type.destroy redirect_to gamification_item_types_url, notice: 'Item type was successfully destroyed.' end |
#edit ⇒ Object
GET /gamification/item_types/1/edit
20 21 |
# File 'app/controllers/gamification/item_types_controller.rb', line 20 def edit end |
#index ⇒ Object
GET /gamification/item_types
6 7 8 |
# File 'app/controllers/gamification/item_types_controller.rb', line 6 def index @gamification_item_types = Gamification::ItemType.all end |
#new ⇒ Object
GET /gamification/item_types/new
15 16 17 |
# File 'app/controllers/gamification/item_types_controller.rb', line 15 def new @gamification_item_type = Gamification::ItemType.new end |
#show ⇒ Object
GET /gamification/item_types/1
11 12 |
# File 'app/controllers/gamification/item_types_controller.rb', line 11 def show end |
#update ⇒ Object
PATCH/PUT /gamification/item_types/1
37 38 39 40 41 42 43 |
# File 'app/controllers/gamification/item_types_controller.rb', line 37 def update if @gamification_item_type.update(gamification_item_type_params) redirect_to @gamification_item_type, notice: 'Item type was successfully updated.' else render :edit end end |