Sha256: 8460f33e3d7e9e9b7a5da5b1bdd43bcca06d599644ddb5951cbed0b7279720a2
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
class IllustrationsController < ApplicationController def index @illustrations = Illustration.by_recent render layout: 'admin' end def show @illustration = Illustration.find(params[:id]) render layout: 'admin' end def new @illustration = Illustration.new render layout: 'admin' end def edit @illustration = Illustration.find(params[:id]) render layout: 'admin' end def create @illustration = Illustration.new(params[:illustration]) if @illustration.save redirect_to @illustration, notice: 'Illustration was successfully created.' else render action: "new", layout: 'admin' end end def update @illustration = Illustration.find(params[:id]) if @illustration.update_attributes(params[:illustration]) redirect_to @illustration, notice: 'Illustration was successfully updated.' else render action: "edit", layout: 'admin' end end def destroy @illustration = Illustration.find(params[:id]) @illustration.destroy redirect_to illustrations_url end end
Version data entries
3 entries across 3 versions & 1 rubygems