Sha256: fbe410c797929483e94c1aae0a4df04cec71ad5f9879b2fb80a41da7567d77c0

Contents?: true

Size: 648 Bytes

Versions: 22

Compression:

Stored size: 648 Bytes

Contents

class PostsController < ApplicationController
  expose(:posts) { Post.all }
  expose(:post)
  
  def index
  end

  def admin
  end

  def guest
  end

  def admin_account
  end

  def show
  end

  def new
  end

  def create
    if post.save
      redirect_to post, :notice => "Successfully created post."
    else
      render :new
    end
  end

  def edit
  end
  
  def update
    if post.update_attributes(params[:post])
      redirect_to post, :notice => "Successfully updated post."
    else
      render :edit
    end
  end
  
  def destroy
    post.destroy
    redirect_to posts_url, :notice => "Successfully destroyed post."
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
cantango-0.9.4.7 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.4.6 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.4.5 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.4.3 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.4.2 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.4.1 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.4 spec/dummy/app/controllers/posts_controller.rb
cantango-0.9.3.2 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.9.5 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.9.4 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.9.3 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.9.2 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.9.1 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.9 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.8.1 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.8 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.7 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.6.2 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.6.1 spec/dummy/app/controllers/posts_controller.rb
cantango-0.8.6 spec/dummy/app/controllers/posts_controller.rb