Skip to content

Commit

Permalink
Use correct way of defining scope
Browse files Browse the repository at this point in the history
  • Loading branch information
chasestubblefield committed Aug 9, 2013
1 parent bcd4d60 commit 2c36f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/fixtures/active_record_fixtures.rb
Expand Up @@ -38,7 +38,7 @@ class Item < ActiveRecord::Base
has_many :assoc_items
has_and_belongs_to_many :multi_items

scope :has_category, where('category IS NOT NULL')
scope :has_category, -> { where('category IS NOT NULL') }

def attribute_via_method
@attribute_via_method ||= created_at.to_i
Expand Down

0 comments on commit 2c36f79

Please sign in to comment.