Class: RedmineRest::Models::Collections::Base

Inherits:
ActiveResource::Collection
  • Object
show all
Defined in:
lib/redmine_rest/models/collections/base.rb

Overview

Base class for most custom collections

Instance Method Summary collapse

Instance Method Details

#filter_by_name_substring(str) ⇒ Object



11
12
13
14
# File 'lib/redmine_rest/models/collections/base.rb', line 11

def filter_by_name_substring(str)
  str = Unicode.downcase(str)
  self.class.new @elements.find_all { |e| Unicode.downcase(e.name).include? str }
end