Sha256: 58f1b311db4f659cb8a9b8c73fe8535cd815a74c052c5180b65c0c9b753083d8
Contents?: true
Size: 535 Bytes
Versions: 2
Compression:
Stored size: 535 Bytes
Contents
if defined?(::ActiveRecord) class ActiveRecord::Base def self.rails_admin(&block) ActiveSupport::Deprecation.warn("'#{self.name}.rails_admin { }' is deprecated, content is not evaluated anymore, use initializer instead", caller) end 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
Version data entries
2 entries across 2 versions & 2 rubygems
Version | Path |
---|---|
obitum-rails_admin-0.0.1 | config/initializers/active_record_extensions.rb |
elucid-rails_admin-0.0.1 | config/initializers/active_record_extensions.rb |