Sha256: 6a993ba88d214a4318934c53af6ccea349e2596d09ab568a6db859c072fa883b
Contents?: true
Size: 456 Bytes
Versions: 11
Compression:
Stored size: 456 Bytes
Contents
if defined?(::ActiveRecord) module ActiveRecord class Base def self.rails_admin(&block) RailsAdmin.config(self, &block) end def rails_admin_default_object_label_method self.new_record? ? "new #{self.class}" : "#{self.class} ##{id}" end def safe_send(value) if self.has_attribute?(value) read_attribute(value) else send(value) end end end end end
Version data entries
11 entries across 11 versions & 2 rubygems