Sha256: 892fe4d9a33f40d6bc811c011a63d95d26b535965530367a541f51cfd9561cb9

Contents?: true

Size: 325 Bytes

Versions: 2

Compression:

Stored size: 325 Bytes

Contents

class Object

  ##
  # TODO: Improve this code, which works, but probably there's a better way
  #       to make the verification.
  #
  # Probably there's a better way to verify if a model responds to an STI
  # pattern.
  def self.is_sti?
    (name != base_class.name) && base_class.descends_from_active_record?
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
typus-3.1.8 lib/support/object.rb
typus-3.1.7 lib/support/object.rb