lib/redmine_rest/models/user.rb in redmine_rest-0.1.1 vs lib/redmine_rest/models/user.rb in redmine_rest-0.2.0

- old
+ new

@@ -6,9 +6,17 @@ # User model # class User < ActiveResource::Base self.format = :xml + def self.find_by_name_or_mail(str) + all_by_name_or_mail(str).first + end + + def self.all_by_name_or_mail(str) + find :all, params: { name: str } + end + def issues(params = {}) params[:assigned_to_id] = id Issue.all params: params end end