Sha256: 9fcc9d6a26ed23f3ae509a812d12bb904592666323a5defd6c87d3040c7750de

Contents?: true

Size: 493 Bytes

Versions: 4

Compression:

Stored size: 493 Bytes

Contents

require 'active_resource'

require_relative 'collections/issue_status'

module RedmineRest
  module Models
    #
    # issue status model
    #
    class IssueStatus < ActiveResource::Base
      self.format = :xml
      self.collection_parser = Collections::IssueStatus

      def self.find(*args)
        fail('Issue statuses can be loaded as :all only') unless args.size == 1 && args.first == :all

        return @statuses if @statuses
        @statuses = super
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
redmine_rest-0.5.2 lib/redmine_rest/models/issue_status.rb
redmine_rest-0.5.1 lib/redmine_rest/models/issue_status.rb
redmine_rest-0.5.0 lib/redmine_rest/models/issue_status.rb
redmine_rest-0.4.0 lib/redmine_rest/models/issue_status.rb