diff --git a/app/controllers/articles_controller.rb b/app/controllers/articles_controller.rb deleted file mode 100644 index da1559f..0000000 --- a/app/controllers/articles_controller.rb +++ /dev/null @@ -1,50 +0,0 @@ -class ArticlesController < ApplicationController - - def index - @articles = Article.alphabetical.paginate(:page => params[:page]).per_page(10) - end - - - def show - @article = Article.find(params[:id]) - end - - - def new - @article = Article.new - end - - - def edit - @article = Article.find(params[:id]) - end - - - def create - @article = Article.new(params[:article]) - if @article.save - flash[:notice] = 'Article was successfully created.' - redirect_to article_path(@article) - else - render :action => "new" - end - end - - - def update - @article = Article.find(params[:id]) - if @article.update_attributes(params[:article]) - flash[:notice] = 'Article was successfully updated.' - redirect_to article_path(@article) - else - render :action => "edit" - end - end - - - def destroy - @article = Article.find(params[:id]) - @article.destroy - redirect_to articles_path - end -end diff --git a/app/controllers/photos_controller.rb b/app/controllers/photos_controller.rb index 65a8044..bd73a3c 100644 --- a/app/controllers/photos_controller.rb +++ b/app/controllers/photos_controller.rb @@ -1,7 +1,7 @@ class PhotosController < ApplicationController def index - @photos = Photo.alphabetical.paginate(:page => params[:page]).per_page(5) + @photos = Photo.active.alphabetical.paginate(:page => params[:page]).per_page(5) end diff --git a/app/controllers/proverbs_controller.rb b/app/controllers/proverbs_controller.rb index c8789a0..1853912 100644 --- a/app/controllers/proverbs_controller.rb +++ b/app/controllers/proverbs_controller.rb @@ -1,7 +1,7 @@ class ProverbsController < ApplicationController def index - @proverbs = Proverb.alphabetical.paginate(:page => params[:page]).per_page(10) + @proverbs = Proverb.alphabetical.active.paginate(:page => params[:page]).per_page(10) end