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