Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 1519:afce8026aaeb redmine-2.4-integration
Merge from branch "live"
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:34:53 +0100 |
parents | 29dd06e01be3 |
children |
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 scope :name_or_homepage_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