lib/redmine_rest/models/issue.rb in redmine_rest-0.5.1 vs lib/redmine_rest/models/issue.rb in redmine_rest-0.5.2

- old
+ new

@@ -2,10 +2,11 @@ require_relative 'user' require_relative 'project' require_relative 'version' require_relative 'relation' +require_relative 'tracker' require_relative 'collections/issue' module RedmineRest module Models # @@ -13,10 +14,11 @@ # class Issue < ActiveResource::Base self.format = :xml self.collection_parser = Collections::Issue + has_one :tracker, class_name: Tracker has_one :author, class_name: User has_one :assigned_to, class_name: User has_one :project, class_name: Project has_one :version, class_name: Version has_one :parent, class_name: Issue @@ -44,10 +46,11 @@ super(what, options) end def method_missing(method, *args) - args.empty? && !block_given? ? attributes[method] : super + return super if block_given? || method.to_s.end_with?('?') || !args.empty? + attributes[method] end end end end