diff options
Diffstat (limited to 'lib/model_patches.rb')
-rw-r--r-- | lib/model_patches.rb | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/lib/model_patches.rb b/lib/model_patches.rb index 8abd4e8..b0c906f 100644 --- a/lib/model_patches.rb +++ b/lib/model_patches.rb @@ -5,11 +5,17 @@ # See http://stackoverflow.com/questions/7072758/plugin-not-reloading-in-development-mode # Rails.configuration.to_prepare do - OutgoingMessage.class_eval do - # Add intro paragraph to new request template - def default_letter - return nil if self.message_type == 'followup' - #"If you uncomment this line, this text will appear as default text in every message" - end - end + + # Example of adding a default text to each message + # OutgoingMessage.class_eval do + # # Add intro paragraph to new request template + # def default_letter + # # this line allows the default_letter text added by this + # # method to be replaced by the value supplied by the API + # # e.g. http://demo.alaveteli.org/new/tgq?default_letter=this+is+a+test + # return @default_letter if @default_letter + # return nil if self.message_type == 'followup' + # "If you uncomment this line, this text will appear as default text in every message" + # end + # end end |