From a5537818e559c5a30c1bf07dd49a1f4cb06fa1ea Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Tue, 9 Apr 2013 15:57:13 +0100 Subject: Replace Dispatcher.to_prepare with Rails.configuration.to_prepare --- lib/controller_patches.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/controller_patches.rb') diff --git a/lib/controller_patches.rb b/lib/controller_patches.rb index 11b5722..b512fa7 100644 --- a/lib/controller_patches.rb +++ b/lib/controller_patches.rb @@ -4,8 +4,7 @@ # classes are reloaded, but initialization is not run each time. # See http://stackoverflow.com/questions/7072758/plugin-not-reloading-in-development-mode # -require 'dispatcher' -Dispatcher.to_prepare do +Rails.configuration.to_prepare do # Example adding an instance variable to the frontpage controller GeneralController.class_eval do def mycontroller -- cgit v1.2.3 From 114706080a6c593cea7413a0b8b9d4be62b7b212 Mon Sep 17 00:00:00 2001 From: Mark Longair Date: Tue, 9 Apr 2013 17:15:21 +0100 Subject: Explicitly add a survey method to UserController Previously the survey.rhtml method was rendered by default if no action matching 'survey' was found in the controller, but this doesn't seem to be the case with some configurations. This is rather unsatisfactory, in that we haven't found documentation of any change that might cause this different behaviour, but the pragmatic solution is to just to add the empty survey method and move on. --- lib/controller_patches.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/controller_patches.rb') diff --git a/lib/controller_patches.rb b/lib/controller_patches.rb index b512fa7..9959f86 100644 --- a/lib/controller_patches.rb +++ b/lib/controller_patches.rb @@ -11,4 +11,8 @@ Rails.configuration.to_prepare do @say_something = "Greetings friend" end end + HelpController.class_eval do + def help_out + end + end end -- cgit v1.2.3