Skip to content

Commit

Permalink
[DEPRACATION] default scope uses block instead of lambda
Browse files Browse the repository at this point in the history
  • Loading branch information
nimaai committed Mar 27, 2014
1 parent 8c055b9 commit 2bc1807
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/language.rb
@@ -1,6 +1,6 @@
class Language < ActiveRecord::Base

default_scope -> {order(:name)}
default_scope { order(:name) }
scope :active_languages, -> {where(:active => true)}

validates_uniqueness_of :default, :if => Proc.new { |l| l.default }
Expand Down
2 changes: 1 addition & 1 deletion app/models/location.rb
Expand Up @@ -29,7 +29,7 @@ def to_s

#################################################################

default_scope -> {includes(:building)}
default_scope { includes(:building) }

#################################################################

Expand Down

0 comments on commit 2bc1807

Please sign in to comment.