#90: moved code

This commit is contained in:
Vokhmin Alexey V 2012-09-26 19:41:00 +04:00
parent 6f889b15a9
commit 5f0e683711
1 changed files with 1 additions and 2 deletions

View File

@ -31,8 +31,7 @@ class Issue < ActiveRecord::Base
# Using mb_chars for correct transform to lowercase ('Русский Текст'.downcase => "Русский Текст")
scope :search, lambda {|q| where('issues.title ILIKE ?', "%#{q.mb_chars.downcase}%") if q.present?}
scope :def_order, order('issues.serial_id desc')
scope :without_pull_requests,
where('NOT EXISTS (select null from pull_requests as pr where pr.issue_id = issues.id)')
scope :without_pull_requests, where('NOT EXISTS (select null from pull_requests as pr where pr.issue_id = issues.id)')
def assign_uname
assignee.uname if assignee