Skip to content
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.

Commit

Permalink
Changes SQL syntax from "... NOT NULL" to "... IS NOT NULL" for PG co…
Browse files Browse the repository at this point in the history
…mpatibility.
  • Loading branch information
joegatt committed May 25, 2013
1 parent a02cc42 commit f08fab6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/models/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ class Source < ActiveRecord::Base
default_scope :order => 'tag'

# See http://stackoverflow.com/questions/3875564
scope :citable, where("title NOT ? AND tag NOT ?", nil, nil)
scope :publishable, where("title NOT ? AND tag NOT ?", nil, nil)
scope :citable, where("title IS NOT ? AND tag IS NOT ?", nil, nil)
scope :publishable, where("title IS NOT ? AND tag IS NOT ?", nil, nil)
.joins('left outer join notes_sources on sources.id = notes_sources.source_id')
.where('notes_sources.source_id NOT ?', nil)
.where('notes_sources.source_id IS NOT ?', nil)
.uniq
scope :need_syncdown, where("dirty = ? AND attempts <= ?", true, Settings.notes.attempts)
scope :maxed_out, where("attempts > ?", Settings.notes.attempts).order('updated_at')
Expand Down

0 comments on commit f08fab6

Please sign in to comment.