view plugins/redmine_bibliography/lib/bibliography/project_publications_patch.rb @ 1313:17f075c7fd41 redmine-2.2-integration

toggles bibtex.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 18 Jun 2013 14:59:04 +0100
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