Mercurial > hg > soundsoftware-site
view vendor/plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 971:b80f97c892bc cannam
Merge from branch "get_statistics"
author | Chris Cannam |
---|---|
date | Fri, 19 Oct 2012 14:47:14 +0100 |
parents | fbdfec975bfa |
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 named_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