Sha256: af47db2a816f4e452b9ed098533757c24bdcc2289825f76c5c655806e497f562

Contents?: true

Size: 300 Bytes

Versions: 35

Compression:

Stored size: 300 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?
    superclass.superclass == ActiveRecord::Base
  end

end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
typus-3.1.6 lib/support/object.rb
typus-3.1.5 lib/support/object.rb
typus-3.1.4 lib/support/object.rb
typus-3.1.3 lib/support/object.rb
typus-3.1.2 lib/support/object.rb
typus-3.1.1 lib/support/object.rb
typus-3.1.0 lib/support/object.rb
typus-3.1.0.rc19 lib/support/object.rb
typus-3.1.0.rc18 lib/support/object.rb
typus-3.0.12 lib/support/object.rb
typus-3.1.0.rc17 lib/support/object.rb
typus-3.1.0.rc16 lib/support/object.rb
typus-3.1.0.rc15 lib/support/object.rb
typus-3.1.0.rc14 lib/support/object.rb
typus-3.0.11 lib/support/object.rb
typus-3.1.0.rc13 lib/support/object.rb
typus-3.1.0.rc12 lib/support/object.rb
typus-3.0.11.rc5 lib/support/object.rb
typus-3.1.0.rc11 lib/support/object.rb
typus-3.1.0.rc10 lib/support/object.rb