Sha256: 6632d4aa70ef75e386cdfc6153a18add020278a0dec9f4e4c6a4534b06a1c074
Contents?: true
Size: 656 Bytes
Versions: 22
Compression:
Stored size: 656 Bytes
Contents
class CommentsController < ApplicationController before_filter :authenticate_user! expose(:articles) { Article.all } expose(:article) def index end def show end def new end def create if article.save redirect_to article, :notice => "Successfully created article." else render :new end end def edit end def update if article.update_attributes(params[:article]) redirect_to article, :notice => "Successfully updated article." else render :edit end end def destroy article.destroy redirect_to articles_url, :notice => "Successfully destroyed article." end end
Version data entries
22 entries across 22 versions & 1 rubygems