summaryrefslogtreecommitdiffstats
path: root/app/controllers/news_controller.rb
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-09-24 16:26:46 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-09-24 16:26:46 +0000
commitdeed1b949d6340c87a2cee9cca411e70d908eaf4 (patch)
tree7b6f81ef08306483f0490bb16ea00f9a7da4d693 /app/controllers/news_controller.rb
parent20305418f475abced81843a847d1192a74647f69 (diff)
downloadredmine-deed1b949d6340c87a2cee9cca411e70d908eaf4.tar.gz
redmine-deed1b949d6340c87a2cee9cca411e70d908eaf4.zip
Refactor: move NewsController#preview to PreviewsController#news
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4174 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/news_controller.rb')
-rw-r--r--app/controllers/news_controller.rb13
1 files changed, 4 insertions, 9 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb
index 47f467862..eebc0ba02 100644
--- a/app/controllers/news_controller.rb
+++ b/app/controllers/news_controller.rb
@@ -18,10 +18,10 @@
class NewsController < ApplicationController
default_search_scope :news
model_object News
- before_filter :find_model_object, :except => [:new, :create, :index, :preview]
- before_filter :find_project_from_association, :except => [:new, :create, :index, :preview]
- before_filter :find_project, :only => [:new, :create, :preview]
- before_filter :authorize, :except => [:index, :preview]
+ before_filter :find_model_object, :except => [:new, :create, :index]
+ before_filter :find_project_from_association, :except => [:new, :create, :index]
+ before_filter :find_project, :only => [:new, :create]
+ before_filter :authorize, :except => [:index]
before_filter :find_optional_project, :only => :index
accept_key_auth :index
@@ -78,11 +78,6 @@ class NewsController < ApplicationController
redirect_to :action => 'index', :project_id => @project
end
- def preview
- @text = (params[:news] ? params[:news][:description] : nil)
- render :partial => 'common/preview'
- end
-
private
def find_project
@project = Project.find(params[:project_id])