mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-03 22:41:48 +01:00
A few of the flash fixes slipped by the last commit.
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@335 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
99b734a52c
commit
8c193a65d6
4 changed files with 9 additions and 9 deletions
|
|
@ -80,7 +80,7 @@ class DeferredController < ApplicationController
|
|||
|
||||
respond_to do |wants|
|
||||
wants.html do
|
||||
flash["notice"] = 'Successfully deleted next action' if @saved
|
||||
flash[:notice] = 'Successfully deleted next action' if @saved
|
||||
redirect_to :action => "index"
|
||||
end
|
||||
wants.js do
|
||||
|
|
@ -93,7 +93,7 @@ class DeferredController < ApplicationController
|
|||
rescue
|
||||
respond_to do |wants|
|
||||
wants.html do
|
||||
flash["warning"] = 'An error occurred on the server.'
|
||||
flash[:warning] = 'An error occurred on the server.'
|
||||
redirect_to :action => "index"
|
||||
end
|
||||
wants.js { render :action => 'error' }
|
||||
|
|
@ -132,7 +132,7 @@ class DeferredController < ApplicationController
|
|||
if @user == item.user
|
||||
return item
|
||||
else
|
||||
flash["warning"] = "Item and session user mis-match: #{item.user.name} and #{@user.name}!"
|
||||
flash[:warning] = "Item and session user mis-match: #{item.user.name} and #{@user.name}!"
|
||||
render_text ""
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class MobileController < ApplicationController
|
|||
if @user == item.user
|
||||
return item
|
||||
else
|
||||
flash["warning"] = "Item and session user mis-match: #{item.user.name} and #{@user.name}!"
|
||||
flash[:warning] = "Item and session user mis-match: #{item.user.name} and #{@user.name}!"
|
||||
render_text ""
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ class NoteController < ApplicationController
|
|||
if note.save
|
||||
render :partial => 'notes', :object => note
|
||||
else
|
||||
flash["warning"] = "Couldn't update note \"#{note.id.to_s}\""
|
||||
flash[:warning] = "Couldn't update note \"#{note.id.to_s}\""
|
||||
render :text => ''
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class TodoController < ApplicationController
|
|||
@contexts_to_show = @contexts.reject {|x| x.hide? }
|
||||
|
||||
if @contexts.empty?
|
||||
flash['warning'] = 'You must add at least one context before adding next actions.'
|
||||
flash[:warning] = 'You must add at least one context before adding next actions.'
|
||||
end
|
||||
|
||||
# Set count badge to number of not-done, not hidden context items
|
||||
|
|
@ -90,7 +90,7 @@ class TodoController < ApplicationController
|
|||
rescue
|
||||
respond_to do |wants|
|
||||
wants.html do
|
||||
flash["warning"] = 'An error occurred on the server.'
|
||||
flash[:warning] = 'An error occurred on the server.'
|
||||
render :action => "index"
|
||||
end
|
||||
wants.js { render :action => 'error' }
|
||||
|
|
@ -224,7 +224,7 @@ class TodoController < ApplicationController
|
|||
rescue
|
||||
respond_to do |wants|
|
||||
wants.html do
|
||||
flash["warning"] = 'An error occurred on the server.'
|
||||
flash[:warning] = 'An error occurred on the server.'
|
||||
redirect_to :action => 'index'
|
||||
end
|
||||
wants.js { render :action => 'error' }
|
||||
|
|
@ -256,7 +256,7 @@ class TodoController < ApplicationController
|
|||
@error_message = 'Item and session user mis-match: #{item.user.name} and #{@user.name}!'
|
||||
respond_to do |wants|
|
||||
wants.html do
|
||||
flash["warning"] = @error_message
|
||||
flash[:warning] = @error_message
|
||||
render :action => "index"
|
||||
end
|
||||
wants.js { render :action => 'error' }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue