Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 1135:522f2aff1f07 redmine-2.2-integration
Fix Ruby syntax
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Thu, 10 Jan 2013 11:01:05 +0000 |
parents | 807426fa6017 |
children | 29dd06e01be3 |
line wrap: on
line source
require_dependency 'project' module Bibliography module ProjectPublicationsPatch def self.included(base) base.class_eval do has_and_belongs_to_many :publications, :uniq => true # todo: review usage of scope --lf.20130108 scope :like, lambda {|q| s = "%#{q.to_s.strip.downcase}%" {:conditions => ["LOWER(name) LIKE :s OR LOWER(homepage) LIKE :s", {:s => s}], :order => 'name' } } end end #self.included module ProjectMethods end #ProjectMethods end #ProjectPublicationsPatch end #RedmineBibliography