Sha256: c98ac931da11d21c5928e422d3e855d966bb552343137643e5de783e354225ca
Contents?: true
Size: 1.59 KB
Versions: 1
Compression:
Stored size: 1.59 KB
Contents
class Gamification::ItemGroupsController < ApplicationController before_action :set_gamification_item_group, only: [:show, :edit, :update, :destroy] # GET /gamification/item_groups def index @gamification_item_groups = Gamification::ItemGroup.all end # GET /gamification/item_groups/1 def show end # GET /gamification/item_groups/new def new @gamification_item_group = Gamification::ItemGroup.new end # GET /gamification/item_groups/1/edit def edit end # POST /gamification/item_groups def create @gamification_item_group = Gamification::ItemGroup.new(gamification_item_group_params) if @gamification_item_group.save redirect_to @gamification_item_group, notice: 'Item group was successfully created.' else render :new end end # PATCH/PUT /gamification/item_groups/1 def update if @gamification_item_group.update(gamification_item_group_params) redirect_to @gamification_item_group, notice: 'Item group was successfully updated.' else render :edit end end # DELETE /gamification/item_groups/1 def destroy @gamification_item_group.destroy redirect_to gamification_item_groups_url, notice: 'Item group was successfully destroyed.' end private # Use callbacks to share common setup or constraints between actions. def set_gamification_item_group @gamification_item_group = Gamification::ItemGroup.find(params[:id]) end # Only allow a trusted parameter "white list" through. def gamification_item_group_params params.require(:gamification_item_group).permit(:name) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
go_gamification-0.0.17 | app/controllers/gamification/item_groups_controller.rb |