Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 1496:17c7ffe039b1 redmine-2.4-integration
Merge from default branch
author | Chris Cannam |
---|---|
date | Mon, 17 Mar 2014 08:57:53 +0000 |
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