app/models/data_object.rb
# TODO - find the culrpits and fix them!
# Gives you the attribute regardless of whether it's been loaded in this instance. It's minimally but notably
# expensive, so if you find this is being called often, you should probably widen your #select from wherever you
# loaded your instance. In fact, when this method is called, it's a bit of a bad smell!
find the culrpits and fix them.
Gives you the attribute regardless of whether it's been loaded in this instance. It's minimally but notably
expensive, so if you find this is being called often, you should probably widen your #select from wherever you
loaded your instance. In fact, when this method is called, it's a bit of a bad smell!
find the culrpits and fix them . Gives you the attribute regardless of whether it ' s been loaded in this instance . It ' s minimally but notably expensive so if you find this is being called often you should probably widen your #select from wherever you loaded your instance . In fact when this method is called it ' s a bit of a bad smell!
def safe_attribute(attribute)
    @safe_attributes ||= {}
    @safe_attributes[attribute] ||= if has_attribute?(attribute)
        send(attribute)
      else
        DataObject.select(attribute.to_s).find(self).send(attribute)
      end
  end
def safe_attribute ( attribute ) @safe_attributes ||= { } @safe_attributes [ attribute ] ||= if has_attribute? ( attribute ) send ( attribute ) else DataObject . select ( attribute . to_s ) . find ( self ) . send ( attribute ) end end
TODO - find the culrpits and fix them!
TODO - find the culrpits and fix them!
attribute
<not_specific>