Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (14 sloc) 0.343 kB
if defined?(::ActiveRecord)
class ActiveRecord::Base
def rails_admin_default_object_label_method
"#{self.class.to_s} ##{self.try :id}"
end
def safe_send(value)
if self.attributes.find{ |k,v| k.to_s == value.to_s }
self.read_attribute(value)
else
self.send(value)
end
end
end
end
Jump to Line
Something went wrong with that request. Please try again.