Sha256: 520f0ec447d5cf0a08f95e837437e15e1b59c292c525dc91599ad5086d97be9c

Contents?: true

Size: 903 Bytes

Versions: 6

Compression:

Stored size: 903 Bytes

Contents

module Journey
  class Resource < ActiveResource::Base

    def self.find(*arguments)
      scope   = arguments.slice!(0)

      options = arguments.slice!(0) || {}

      self.embeds ||= []

      unless options.has_key?(:embed) && !options.delete(:embed)
        options.deep_merge!(params: { embed: embeds })
      end

      super *([scope, options] + arguments)
    end

  end
end

require 'journey/resource/api'
require 'journey/resource/attachments'
require 'journey/resource/attribute_loading'
require 'journey/resource/count'
require 'journey/resource/embed'
require 'journey/resource/enums'
require 'journey/resource/enum_sets'
require 'journey/resource/queries'
require 'journey/resource/search'

class Journey::Resource
  include API
  include Attachments
  include AttributeLoading
  include Count
  include Embed
  include Enums
  include EnumSets
  include Queries
  include Search
end


Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
embark-journey-0.0.21 lib/journey/resource.rb
embark-journey-0.0.20 lib/journey/resource.rb
embark-journey-0.0.19 lib/journey/resource.rb
embark-journey-0.0.18 lib/journey/resource.rb
embark-journey-0.0.17 lib/journey/resource.rb
embark-journey-0.0.16 lib/journey/resource.rb