Change this to data.respond_to? Rails.env.to_sym, also this breaks the behaviour of defaults.. since before it returned nil and evaluated data.defaults, and now it just throws an exception.