Sha256: 75df1dd3f960c2cb54f761d1f4714533ed0df535dab03cb3ba8826a18724992a

Contents?: true

Size: 847 Bytes

Versions: 20

Compression:

Stored size: 847 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

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

20 entries across 20 versions & 1 rubygems

Version Path
restful_resource-0.9.7 spec/fixtures.rb
restful_resource-0.9.5 spec/fixtures.rb
restful_resource-0.9.4 spec/fixtures.rb
restful_resource-0.9.3 spec/fixtures.rb
restful_resource-0.9.2 spec/fixtures.rb
restful_resource-0.9.1 spec/fixtures.rb
restful_resource-0.9.0 spec/fixtures.rb
restful_resource-0.8.34 spec/fixtures.rb
restful_resource-0.8.33 spec/fixtures.rb
restful_resource-0.8.32 spec/fixtures.rb
restful_resource-0.8.30 spec/fixtures.rb
restful_resource-0.8.29 spec/fixtures.rb
restful_resource-0.8.28 spec/fixtures.rb
restful_resource-0.8.27 spec/fixtures.rb
restful_resource-0.8.26 spec/fixtures.rb
restful_resource-0.8.25 spec/fixtures.rb
restful_resource-0.8.24 spec/fixtures.rb
restful_resource-0.8.23 spec/fixtures.rb
restful_resource-0.8.22 spec/fixtures.rb
restful_resource-0.8.21 spec/fixtures.rb