Sha256: 35a43a1b75cc98e0b63b4ab4922dffe8e798ed5560920a73837624c47010548d
Contents?: true
Size: 1.68 KB
Versions: 3
Compression:
Stored size: 1.68 KB
Contents
require_dependency 'mks/auth/application_controller' module Mks module Auth class ApplicationModulesController < ApplicationController before_action :set_application_module, only: [:show, :edit, :update, :destroy] # GET /application_modules def index @application_modules = ApplicationModule.all end # GET /application_modules/new def new @application_module = ApplicationModule.new end # GET /application_modules/1/edit def edit end # POST /application_modules def create @application_module = ApplicationModule.new(application_module_params) if @application_module.save redirect_to @application_module, notice: 'Application module was successfully created.' else render :new end end # PATCH/PUT /application_modules/1 def update if @application_module.update(application_module_params) redirect_to @application_module, notice: 'Application module was successfully updated.' else render :edit end end # DELETE /application_modules/1 def destroy @application_module.destroy redirect_to application_modules_url, notice: 'Application module was successfully destroyed.' end private # Use callbacks to share common setup or constraints between actions. def set_application_module @application_module = ApplicationModule.find(params[:id]) end # Only allow a trusted parameter "white list" through. def application_module_params params.require(:application_module).permit(:code, :name) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems