Skip to content

Commit

Permalink
Change lambda syntax for Ruby 1.8.7
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki24 committed Nov 22, 2014
1 parent 68646cc commit efafb4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/fake_app/active_record/models.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def readers
User.joins(:books_read => :authors).where(:authors_books => {:id => self})
end

scope :by_name, ->{ order(:name) }
scope :by_name, lambda { order(:name) }
scope :by_read_count, lambda {
cols = if connection.adapter_name == "PostgreSQL"
column_names.map { |column| %{"users"."#{column}"} }.join(", ")
Expand Down

0 comments on commit efafb4d

Please sign in to comment.