From 4bd2c48f7f1f75d71b3eaed73e3893a2b42b0fee Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 4 Apr 2016 14:59:27 +0100 Subject: Make code customization commented out examples. Rather than having them be live code. --- lib/controller_patches.rb | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'lib/controller_patches.rb') diff --git a/lib/controller_patches.rb b/lib/controller_patches.rb index 9959f86..6923062 100644 --- a/lib/controller_patches.rb +++ b/lib/controller_patches.rb @@ -6,13 +6,14 @@ # Rails.configuration.to_prepare do # Example adding an instance variable to the frontpage controller - GeneralController.class_eval do - def mycontroller - @say_something = "Greetings friend" - end - end - HelpController.class_eval do - def help_out - end - end + # GeneralController.class_eval do + # def mycontroller + # @say_something = "Greetings friend" + # end + # end + # Example adding a new action to an existing controller + # HelpController.class_eval do + # def help_out + # end + # end end -- cgit v1.2.3 From 8ccab37ebc69e0e729b0b1748378006a811f4071 Mon Sep 17 00:00:00 2001 From: Louise Crow Date: Mon, 4 Apr 2016 15:05:20 +0100 Subject: Convert to two-space indentation. --- lib/controller_patches.rb | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'lib/controller_patches.rb') diff --git a/lib/controller_patches.rb b/lib/controller_patches.rb index 6923062..5c48e70 100644 --- a/lib/controller_patches.rb +++ b/lib/controller_patches.rb @@ -5,15 +5,15 @@ # See http://stackoverflow.com/questions/7072758/plugin-not-reloading-in-development-mode # Rails.configuration.to_prepare do - # Example adding an instance variable to the frontpage controller - # GeneralController.class_eval do - # def mycontroller - # @say_something = "Greetings friend" - # end - # end - # Example adding a new action to an existing controller - # HelpController.class_eval do - # def help_out - # end - # end + # Example adding an instance variable to the frontpage controller + # GeneralController.class_eval do + # def mycontroller + # @say_something = "Greetings friend" + # end + # end + # Example adding a new action to an existing controller + # HelpController.class_eval do + # def help_out + # end + # end end -- cgit v1.2.3