lib/extface/extfaceable.rb in extface-0.1.5 vs lib/extface/extfaceable.rb in extface-0.1.6
- old
+ new
@@ -1,10 +1,10 @@
module Extface
module Extfaceable
extend ActiveSupport::Concern
def composite_id
- "#{self.class.name}##{self.id}"
+ "#{(self.class.try(:base_class) || self.class).send(:name)}##{self.id}"
end
module ClassMethods
def has_extface_devices
has_many :extface_devices, class_name: 'Extface::Device', as: :extfaceable
\ No newline at end of file