Handle Rails adding methods to nil that it really shouldn't.
This commit is contained in:
parent
3a4c5c75dc
commit
ca4af48b7d
@ -137,6 +137,8 @@ module Compass
|
|||||||
def read_without_default(attribute)
|
def read_without_default(attribute)
|
||||||
if set?(attribute)
|
if set?(attribute)
|
||||||
send("raw_#{attribute}")
|
send("raw_#{attribute}")
|
||||||
|
elsif inherited_data.nil?
|
||||||
|
nil
|
||||||
elsif inherited_data.respond_to?("#{attribute}_without_default")
|
elsif inherited_data.respond_to?("#{attribute}_without_default")
|
||||||
inherited_data.send("#{attribute}_without_default")
|
inherited_data.send("#{attribute}_without_default")
|
||||||
elsif inherited_data.respond_to?(attribute)
|
elsif inherited_data.respond_to?(attribute)
|
||||||
|
Loading…
Reference in New Issue
Block a user