mirror of
https://github.com/kbparagua/paloma
synced 2023-03-27 23:21:17 -04:00
30 lines
423 B
Ruby
30 lines
423 B
Ruby
|
# Dummy Controllers
|
||
|
class ApplicationController < ActionController::Base
|
||
|
end
|
||
|
|
||
|
|
||
|
class ArticlesController < ApplicationController
|
||
|
|
||
|
def show
|
||
|
@article = Article.find params[:id]
|
||
|
end
|
||
|
|
||
|
|
||
|
def new
|
||
|
@article = Article.new
|
||
|
end
|
||
|
|
||
|
|
||
|
def create
|
||
|
@article = Article.new params[:article]
|
||
|
|
||
|
if @article.save
|
||
|
redirect_to @article
|
||
|
else
|
||
|
js_callback false
|
||
|
render :new
|
||
|
end
|
||
|
end
|
||
|
|
||
|
end
|