Module: IntegerInheritance::Extension

Extended by:
ActiveSupport::Concern
Defined in:
lib/integer-inheritance/extension.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#as_json(options = {}) ⇒ Object



13
14
15
16
17
18
# File 'lib/integer-inheritance/extension.rb', line 13

def as_json(options = {})
  json = super(options)
  col  = self.class.inheritance_column
  json[col] = send(col)
  json
end