view vendor/plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 620:df7551a82bbe feature_36

Fixed issue with "default" user list in the Author Search select.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Wed, 24 Aug 2011 13:56:47 +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