Merge pull request #610 from coderanger/fix/inheritance

Handle Rails adding methods to nil that it really shouldn't.
This commit is contained in:
Scott Davis 2011-11-01 17:59:41 -07:00
commit 044855e04d

View File

@ -137,6 +137,8 @@ module Compass
def read_without_default(attribute)
if set?(attribute)
send("raw_#{attribute}")
elsif inherited_data.nil?
nil
elsif inherited_data.respond_to?("#{attribute}_without_default")
inherited_data.send("#{attribute}_without_default")
elsif inherited_data.respond_to?(attribute)