Mercurial > hg > soundsoftware-site
view vendor/plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 740:8873bc7c1af5 feature_318
Hack in simplistic download link
author | Chris Cannam <chris.cannam@soundsoftware.ac.uk> |
---|---|
date | Fri, 04 Nov 2011 17:56:58 +0000 |
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