Sha256: 454ee7677791ba29255d709a619c137c0436e868631b7f12714d5391fb66e6cd
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
class DigitalsController < ApplicationController before_action :set_digital, only: [:show, :edit, :update, :destroy] # GET /digitals def index @digitals = Digital.all end # GET /digitals/1 def show end # GET /digitals/new def new @digital = Digital.new end # GET /digitals/1/edit def edit end # POST /digitals def create @digital = Digital.new(digital_params) if @digital.save redirect_to @digital, notice: 'Digital was successfully created.' else render :new end end # PATCH/PUT /digitals/1 def update if @digital.update(digital_params) redirect_to @digital, notice: 'Digital was successfully updated.' else render :edit end end # DELETE /digitals/1 def destroy @digital.destroy redirect_to digitals_url, notice: 'Digital was successfully destroyed.' end private # Use callbacks to share common setup or constraints between actions. def set_digital @digital = Digital.find(params[:id]) end # Only allow a trusted parameter "white list" through. def digital_params params[:digital] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
datashift-0.40.1 | spec/dummy/app/controllers/digitals_controller.rb |
datashift-0.40.0 | spec/dummy/app/controllers/digitals_controller.rb |