def show
respond_to do |format|
- format.html {
+ format.html do
sort_init 'updated_on', 'desc'
sort_update 'created_on' => "#{Message.table_name}.id",
'replies' => "#{Message.table_name}.replies_count",
to_a
@message = Message.new(:board => @board)
render :action => 'show', :layout => !request.xhr?
- }
- format.atom {
+ end
+ format.atom do
@messages = @board.messages.
reorder(:id => :desc).
includes(:author, :board).
limit(Setting.feeds_limit.to_i).
to_a
render_feed(@messages, :title => "#{@project}: #{@board}")
- }
+ end
end
end
@board.safe_attributes = params[:board]
if @board.save
respond_to do |format|
- format.html {
+ format.html do
flash[:notice] = l(:notice_successful_update)
redirect_to_settings_in_projects
- }
+ end
format.js { head 200 }
end
else