Class: Arrest::Ref

Inherits:
Object
  • Object
show all
Includes:
HasAttributes
Defined in:
lib/arrest/attributes/polymorphic_attribute.rb

Instance Attribute Summary

Attributes included from HasAttributes

#attribute_values

Class Method Summary collapse

Methods included from HasAttributes

#attributes, #attributes=, included, #init_from_hash, #initialize, #initialize_has_attributes, #load_from_stub, #render_field_to_hash?, #reset_dirtiness, #stubbed?, #to_hash, #to_jhash, #update_attributes

Class Method Details

.mk_json(value) ⇒ Object



8
9
10
# File 'lib/arrest/attributes/polymorphic_attribute.rb', line 8

def self.mk_json(value)
  self.to_hash.to_json
end

.to_hashObject



12
13
14
# File 'lib/arrest/attributes/polymorphic_attribute.rb', line 12

def self.to_hash
  {:id => value.id, :type => value.type}
end