Sha256: 804f5c0cd8fc4355e136e961b9d6bd4e2d9dd042787a6a4f714271efdb5f63f9

Contents?: true

Size: 987 Bytes

Versions: 22

Compression:

Stored size: 987 Bytes

Contents

class Make < RestfulResource::Base
  resource_path "makes"
  has_many :models
end

class Model < RestfulResource::Base
  has_one :make
  resource_path "groups/:group_id/makes/:make_slug/models"
end

class Dealer < RestfulResource::Base
  include RestfulResource::RailsValidations

  resource_path "dealers"
end

class BaseA < RestfulResource::Base
end

class BaseB < RestfulResource::Base
end

class TestA < BaseA
  self.resource_path "testa"
end

class TestB < BaseB
  self.resource_path "testb"
end

class ModelWithRedirections < RestfulResource::Base
  include RestfulResource::Redirections

  resource_path 'model_with_redirections'
end

module ComplicatedModule
  class Parent < BaseA
    resource_path "parent"
    has_many :children
    has_many :other_things

    def is_parent?
      true
    end
  end

  class Child < BaseA
    resource_path 'parents/:parent_id/children'
    has_one :parent

    def full_name
      "#{self.first_name} #{self.second_name}"
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
restful_resource-2.2.4 spec/fixtures.rb
restful_resource-2.2.3 spec/fixtures.rb
restful_resource-2.2.2 spec/fixtures.rb
restful_resource-2.2.1 spec/fixtures.rb
restful_resource-2.2.0 spec/fixtures.rb
restful_resource-2.0.2 spec/fixtures.rb
restful_resource-2.0.1 spec/fixtures.rb
restful_resource-1.6.0 spec/fixtures.rb
restful_resource-1.5.0 spec/fixtures.rb
restful_resource-1.4.3 spec/fixtures.rb
restful_resource-1.4.2 spec/fixtures.rb
restful_resource-1.4.1 spec/fixtures.rb
restful_resource-1.4.0 spec/fixtures.rb
restful_resource-1.3.0 spec/fixtures.rb
restful_resource-1.2.2 spec/fixtures.rb
restful_resource-1.2.1 spec/fixtures.rb
restful_resource-1.2.0 spec/fixtures.rb
restful_resource-1.1.0 spec/fixtures.rb
restful_resource-1.0.0 spec/fixtures.rb
restful_resource-0.10.2 spec/fixtures.rb