Sha256: 89a2cb31319f29c433df49c6a90b7205edf90d46330adf4ae508c3a9e2683ea4

Contents?: true

Size: 547 Bytes

Versions: 3

Compression:

Stored size: 547 Bytes

Contents

module SurveyGizmoSpec
  class ResourceTest
    include SurveyGizmo::Resource

    attribute :id, Integer
    attribute :title, String
    attribute :test_id, Integer

    # routes
    route '/test/:id', :via => :get
    route '/test/:test_id/resource', :via => :create
    route '/test/:test_id/resource/:id', :via => [:update, :delete]

    def to_param_options
      {id: self.id, test_id: self.test_id}
    end
  end

  class GenericResource
    include SurveyGizmo::Resource

    attribute :id, Integer
    attribute :title, String
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
survey-gizmo-ruby-4.1.0 spec/support/test_resource_classes.rb
survey-gizmo-ruby-4.0.0 spec/support/test_resource_classes.rb
survey-gizmo-ruby-3.0.3 spec/support/test_resource_classes.rb