summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-10-22 14:17:28 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2020-10-22 14:17:28 +0000
commit5c14d09e2503714529c6657eadf74e2173035c41 (patch)
treec9c3d308fa6fe578f49110c0c0f1d87ea916f2cc
parent0d2dd0669ebdf8df9fb8f1be9569fdb4fa6adc74 (diff)
downloadredmine-5c14d09e2503714529c6657eadf74e2173035c41.tar.gz
redmine-5c14d09e2503714529c6657eadf74e2173035c41.zip
shorten long line of NewsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20157 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/news_controller.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb
index a67ef88c8..ac0e6a97e 100644
--- a/app/controllers/news_controller.rb
+++ b/app/controllers/news_controller.rb
@@ -50,12 +50,19 @@ class NewsController < ApplicationController
offset(@offset).
to_a
respond_to do |format|
- format.html {
+ format.html do
@news = News.new # for adding news inline
render :layout => false if request.xhr?
- }
+ end
format.api
- format.atom { render_feed(@newss, :title => (@project ? @project.name : Setting.app_title) + ": #{l(:label_news_plural)}") }
+ format.atom do
+ render_feed(
+ @newss,
+ :title =>
+ (@project ? @project.name : Setting.app_title) +
+ ": #{l(:label_news_plural)}"
+ )
+ end
end
end