module Gearbox::ActiveModelImplementation

I wanted to have all of my ActiveModel mixins in one place. I want to see how this is being used explicitly.

Public Class Methods

included(base) click to toggle source
# File lib/gearbox/mixins/active_model_implementation.rb, line 7
def self.included(base)
  base.send :include, ActiveModel::Validations
  base.send :include, ActiveModel::Conversion

  # This isn't right...so I need to research these things a little bit.
  # What I'm thinking is a RESTful API isn't too much to ask from Gearbox,
  # So I want these to produce JSON and XML in a consistent way...
  # I may be wrong, but I may be getting the RDF::JSON version here instead.
  base.send :include, ActiveModel::Serializers::JSON
  base.send :include, ActiveModel::Serializers::Xml
  
  base.send :extend, ActiveModel::Naming
  base.send :include, ActiveModel::Dirty
end

Public Instance Methods

persisted?() click to toggle source

TODO Temporary!!! Remove after finishing the Mutable changes.

# File lib/gearbox/mixins/active_model_implementation.rb, line 23
def persisted?
  false
end