From bbc47fd82f4a8ef58fa5c042fd2059218635792b Mon Sep 17 00:00:00 2001 From: Guillaume DOTT Date: Wed, 29 May 2013 11:46:31 +0200 Subject: [PATCH] Check if model options have verbose key --- lib/rails_big_brother/model.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/rails_big_brother/model.rb b/lib/rails_big_brother/model.rb index b1d5d58..22d7d08 100644 --- a/lib/rails_big_brother/model.rb +++ b/lib/rails_big_brother/model.rb @@ -36,6 +36,7 @@ module RailsBigBrother unless changed_fields.empty? changed_fields_string = changed_fields.map do |f| f + ( + self.class.big_brother_options.has_key?(:verbose) && self.class.big_brother_options[:verbose].include?(f) ? ":#{send(f)}" : '') end.join(',') big_brother_log 'update', changed_fields_string