Class: RedmineRest::Models::Issue
- Inherits:
- 
      ActiveResource::Base
      
        - Object
- ActiveResource::Base
- RedmineRest::Models::Issue
 
- Defined in:
- lib/redmine_rest/models/issue.rb
Overview
issue model
Class Method Summary collapse
- 
  
    
      .find(what, options = {})  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Adds journals, relations, children and watchers to request. 
Instance Method Summary collapse
Methods inherited from ActiveResource::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
| 54 55 56 57 | # File 'lib/redmine_rest/models/issue.rb', line 54 def method_missing(method, *args) return super if block_given? || method.to_s.end_with?('?') || !args.empty? attributes[method] end | 
Class Method Details
.find(what, options = {}) ⇒ Object
Adds journals, relations, children and watchers to request.
Be careful, even if issue has watchers, it won’t be loaded, because REST API can load them only after v2.3.0 (see Redmine docs)
| 41 42 43 44 45 46 47 48 49 50 51 52 | # File 'lib/redmine_rest/models/issue.rb', line 41 def self.find(what, = {}) [:params] = {} unless [:params] params = [:params] if params[:include] params[:include] += ',journals,relations,children,watchers' else # doubling is not bad params[:include] = 'journals,relations,children,watchers' end super(what, ) end | 
Instance Method Details
#tracker_id ⇒ Object
| 31 32 33 | # File 'lib/redmine_rest/models/issue.rb', line 31 def tracker_id attributes[:tracker_id] || tracker? && tracker.id end |