diff options
Diffstat (limited to 'lib/strip_attributes')
-rw-r--r-- | lib/strip_attributes/strip_attributes.rb | 1 | ||||
-rw-r--r-- | lib/strip_attributes/test/strip_attributes_test.rb | 1 | ||||
-rw-r--r-- | lib/strip_attributes/test/test_helper.rb | 3 |
3 files changed, 4 insertions, 1 deletions
diff --git a/lib/strip_attributes/strip_attributes.rb b/lib/strip_attributes/strip_attributes.rb index 12350277d..2e4383194 100644 --- a/lib/strip_attributes/strip_attributes.rb +++ b/lib/strip_attributes/strip_attributes.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- module StripAttributes # Strips whitespace from model fields and leaves nil values as nil. # TODO: this differs from official StripAttributes, as it doesn't make blank cells null. diff --git a/lib/strip_attributes/test/strip_attributes_test.rb b/lib/strip_attributes/test/strip_attributes_test.rb index 8158dc664..d06ef0671 100644 --- a/lib/strip_attributes/test/strip_attributes_test.rb +++ b/lib/strip_attributes/test/strip_attributes_test.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require "#{File.dirname(__FILE__)}/test_helper" module MockAttributes diff --git a/lib/strip_attributes/test/test_helper.rb b/lib/strip_attributes/test/test_helper.rb index 7d06c40db..6a4f6136a 100644 --- a/lib/strip_attributes/test/test_helper.rb +++ b/lib/strip_attributes/test/test_helper.rb @@ -1,3 +1,4 @@ +# -*- encoding : utf-8 -*- require 'test/unit' require 'rubygems' require 'active_record' @@ -9,7 +10,7 @@ require "#{PLUGIN_ROOT}/init" class ActiveRecord::Base alias_method :save, :valid? - def self.columns() + def self.columns @columns ||= [] end |