Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix named scope + class method example
Closes #8804 [ci skip]

Conflicts:
	activerecord/lib/active_record/scoping/named.rb
  • Loading branch information
carlosantoniodasilva committed Jan 7, 2013
1 parent 831aad2 commit 040ff5b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions activerecord/lib/active_record/scoping/named.rb
Expand Up @@ -161,16 +161,14 @@ def scope_attributes? # :nodoc:
# end
#
# def self.titles
# map(&:title)
# pluck(:title)
# end
#
# end
#
# We are able to call the methods like this:
#
# Article.published.featured.latest_article
# Article.featured.titles

def scope(name, scope_options = {})
name = name.to_sym
valid_scope_name?(name)
Expand Down

0 comments on commit 040ff5b

Please sign in to comment.