Skip to content

Commit

Permalink
Fix with_ids scope
Browse files Browse the repository at this point in the history
  • Loading branch information
rwdaigle committed Nov 21, 2012
1 parent 4f304e6 commit a8d7be9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/gist.rb
Expand Up @@ -8,7 +8,7 @@ class Gist < ActiveRecord::Base
belongs_to :user belongs_to :user
has_many :files, :class_name => 'GistFile', :dependent => :delete_all has_many :files, :class_name => 'GistFile', :dependent => :delete_all


scope :with_ids, lambda { |ids| ids.any? ? where(["id in (?)", ids]) : "1 = 0"} scope :with_ids, lambda { |ids| where(ids.any? ? ["id in (?)", ids] : "1 = 0") }


index_name ELASTICSEARCH_INDEX_NAME index_name ELASTICSEARCH_INDEX_NAME


Expand Down

0 comments on commit a8d7be9

Please sign in to comment.