Sha256: ff9a99cc388fcb450e3fa56b877ce6e021e2f7552889fc373cd0c89b14171272

Contents?: true

Size: 842 Bytes

Versions: 3

Compression:

Stored size: 842 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/attribute_loading'
require 'journey/resource/enums'
require 'journey/resource/enum_sets'
require 'journey/resource/queries'
require 'journey/resource/search'
require 'journey/resource/embed'
require 'journey/resource/count'

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


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
embark-journey-0.0.15 lib/journey/resource.rb
embark-journey-0.0.14 lib/journey/resource.rb
embark-journey-0.0.13 lib/journey/resource.rb