Sha256: e13ce31f3e00dc25488c1edbc4311f0f8772b6e2133e8846bf9aebc3e04866f3

Contents?: true

Size: 611 Bytes

Versions: 4

Compression:

Stored size: 611 Bytes

Contents

require 'active_resource'

require_relative 'collections/base'

module RedmineRest
  module Models
    #
    # Version model
    #
    class Version < ActiveResource::Base
      self.format = :xml
      self.collection_parser = Collections::Base
      self.prefix = '/projects/:project_id/'

      #
      # Overrides parent method.
      # When we want to fetch one version, we need not to use prefix
      #
      def self.element_path(id, _prefix_options = {}, query_options = nil)
        "/versions/#{URI.parser.escape id.to_s}#{format_extension}#{query_string(query_options)}"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redmine_rest-0.8.0 lib/redmine_rest/models/version.rb
redmine_rest-0.7.0 lib/redmine_rest/models/version.rb
redmine_rest-0.6.1 lib/redmine_rest/models/version.rb
redmine_rest-0.6.0 lib/redmine_rest/models/version.rb