Skip to content

Instantly share code, notes, and snippets.

@AJFaraday
Created April 25, 2012 14:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AJFaraday/2490217 to your computer and use it in GitHub Desktop.
Save AJFaraday/2490217 to your computer and use it in GitHub Desktop.
magic method fail
named_scope :searchable, :conditions => ['parent_id is null'], :order => 'lower(name) ASC'
def self.magic
self.with_scope(:searchable) do
puts count
end
puts count
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment