mirror of
https://github.com/redmine/redmine.git
synced 2025-12-16 13:30:28 +01:00
use "do end" instead of {} at BoardsController
git-svn-id: http://svn.redmine.org/redmine/trunk@20299 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -37,7 +37,7 @@ class BoardsController < ApplicationController
|
|||||||
|
|
||||||
def show
|
def show
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html do
|
||||||
sort_init 'updated_on', 'desc'
|
sort_init 'updated_on', 'desc'
|
||||||
sort_update 'created_on' => "#{Message.table_name}.id",
|
sort_update 'created_on' => "#{Message.table_name}.id",
|
||||||
'replies' => "#{Message.table_name}.replies_count",
|
'replies' => "#{Message.table_name}.replies_count",
|
||||||
@@ -54,15 +54,15 @@ class BoardsController < ApplicationController
|
|||||||
to_a
|
to_a
|
||||||
@message = Message.new(:board => @board)
|
@message = Message.new(:board => @board)
|
||||||
render :action => 'show', :layout => !request.xhr?
|
render :action => 'show', :layout => !request.xhr?
|
||||||
}
|
end
|
||||||
format.atom {
|
format.atom do
|
||||||
@messages = @board.messages.
|
@messages = @board.messages.
|
||||||
reorder(:id => :desc).
|
reorder(:id => :desc).
|
||||||
includes(:author, :board).
|
includes(:author, :board).
|
||||||
limit(Setting.feeds_limit.to_i).
|
limit(Setting.feeds_limit.to_i).
|
||||||
to_a
|
to_a
|
||||||
render_feed(@messages, :title => "#{@project}: #{@board}")
|
render_feed(@messages, :title => "#{@project}: #{@board}")
|
||||||
}
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -89,10 +89,10 @@ class BoardsController < ApplicationController
|
|||||||
@board.safe_attributes = params[:board]
|
@board.safe_attributes = params[:board]
|
||||||
if @board.save
|
if @board.save
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html {
|
format.html do
|
||||||
flash[:notice] = l(:notice_successful_update)
|
flash[:notice] = l(:notice_successful_update)
|
||||||
redirect_to_settings_in_projects
|
redirect_to_settings_in_projects
|
||||||
}
|
end
|
||||||
format.js { head 200 }
|
format.js { head 200 }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user