Sha256: 07eceaf2e3590b1f226226e496b0d421fc532f1b4cc380718976adfe939f57c8

Contents?: true

Size: 606 Bytes

Versions: 12

Compression:

Stored size: 606 Bytes

Contents

class EntriesController < ApplicationController
  unit_action :entry_deletion, :destroy

  def index
    invoke(:entry_deletion, :index) do
      @entries = Entry.all
    end
  end

  def show
    @entry = Entry.find(params[:id])
  end

  def new
    @entry = Entry.new
    render :edit
  end

  def create
    @entry = Entry.create(params[:entry].permit(:title, :body))
    redirect_to @entry
  end

  def edit
    @entry = Entry.find(params[:id])
  end

  def update
    @entry = Entry.find(params[:id])
    @entry.update_attributes(params[:entry].permit(:title, :body))
    redirect_to @entry
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
chanko-2.3.0 spec/dummy/app/controllers/entries_controller.rb
chanko-2.2.1 spec/dummy/app/controllers/entries_controller.rb
chanko-2.2.0 spec/dummy/app/controllers/entries_controller.rb
chanko-2.1.1 spec/dummy/app/controllers/entries_controller.rb
chanko-2.1.0 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.8 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.7 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.6 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.5 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.4 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.3 spec/dummy/app/controllers/entries_controller.rb
chanko-2.0.2 spec/dummy/app/controllers/entries_controller.rb