From 239bc3c795a23636239c90cdc310aa722a07c31d Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Tue, 30 Aug 2011 14:13:52 +0000 Subject: [PATCH] remove trailing white-spaces from app/controllers/news_controller.rb. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6809 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/news_controller.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index 7dbd80a57..492ca09a6 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -5,12 +5,12 @@ # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -25,9 +25,9 @@ class NewsController < ApplicationController before_filter :find_optional_project, :only => :index accept_rss_auth :index accept_api_auth :index - + helper :watchers - + def index case params[:format] when 'xml', 'json' @@ -35,9 +35,9 @@ class NewsController < ApplicationController else @limit = 10 end - + scope = @project ? @project.news.visible : News.visible - + @news_count = scope.count @news_pages = Paginator.new self, @news_count, @limit, params['page'] @offset ||= @news_pages.current.offset @@ -45,14 +45,14 @@ class NewsController < ApplicationController :order => "#{News.table_name}.created_on DESC", :offset => @offset, :limit => @limit) - + respond_to do |format| format.html { render :layout => false if request.xhr? } format.api format.atom { render_feed(@newss, :title => (@project ? @project.name : Setting.app_title) + ": #{l(:label_news_plural)}") } end end - + def show @comments = @news.comments @comments.reverse! if User.current.wants_comments_in_reverse_order? @@ -77,7 +77,7 @@ class NewsController < ApplicationController def edit end - + def update if request.put? and @news.update_attributes(params[:news]) flash[:notice] = l(:notice_successful_update) @@ -91,14 +91,14 @@ class NewsController < ApplicationController @news.destroy redirect_to :action => 'index', :project_id => @project end - + private def find_project @project = Project.find(params[:project_id]) rescue ActiveRecord::RecordNotFound render_404 end - + def find_optional_project return true unless params[:project_id] @project = Project.find(params[:project_id]) -- 2.39.5