Mercurial > hg > soundsoftware-site
view plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 1454:02a05da0bedc luisf
Extracting also top-level project stats in script.
author | luisf <luis.figueira@eecs.qmul.ac.uk> |
---|---|
date | Thu, 07 Nov 2013 17:09:55 +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