test/dummy/app/controllers/articles_controller.rb in quo_vadis-1.0.3 vs test/dummy/app/controllers/articles_controller.rb in quo_vadis-1.0.4
- old
+ new
@@ -6,6 +6,15 @@
end
def new
@article = Article.new
end
+
+ def create
+ @article = Article.new params[:article]
+ if @article.save
+ redirect_to :action => 'index'
+ else
+ render 'new'
+ end
+ end
end