Sha256: b83b04e30e2e626719152a6ff23e9ddb2875548e201b6262b71d678302db6b4a

Contents?: true

Size: 411 Bytes

Versions: 1

Compression:

Stored size: 411 Bytes

Contents

module ActsAsCleo
  module CommonMethods
    def query(query, opts = {})
      Cleo.query(query)
    end

    def cleo_id
      record_type = self.cleo_config[:type]
      cr = Cleo::Reference.find_by_reference_and_id(record_type, self.id)
      return cr.nil? ? nil : cr.id
    end

    def cleo_id=( new_id)
      #this needs to be rerolled to pull an Cleo::Reference record and persist it.
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_cleo-0.0.2 lib/common_methods.rb