diff --git a/tracks/app/controllers/deferred_controller.rb b/tracks/app/controllers/deferred_controller.rb index ef72c7e7..1fad2a3f 100644 --- a/tracks/app/controllers/deferred_controller.rb +++ b/tracks/app/controllers/deferred_controller.rb @@ -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 diff --git a/tracks/app/controllers/mobile_controller.rb b/tracks/app/controllers/mobile_controller.rb index 050ff071..22b3700c 100644 --- a/tracks/app/controllers/mobile_controller.rb +++ b/tracks/app/controllers/mobile_controller.rb @@ -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 diff --git a/tracks/app/controllers/note_controller.rb b/tracks/app/controllers/note_controller.rb index 8efa2bce..74a06a62 100644 --- a/tracks/app/controllers/note_controller.rb +++ b/tracks/app/controllers/note_controller.rb @@ -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 diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index e4efbb7a..97019683 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -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' }