Sha256: ce029e9caa0267bce6ba776eb84cc5106383b6234dcb6968776628315aa89a8d
Contents?: true
Size: 625 Bytes
Versions: 22
Compression:
Stored size: 625 Bytes
Contents
class CommentsController < ApplicationController 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