mirror of
				https://github.com/kaminari/kaminari.git
				synced 2022-11-09 13:44:37 -05:00 
			
		
		
		
	Change lambda syntax for Ruby 1.8.7
This commit is contained in:
		
							parent
							
								
									68646cceed
								
							
						
					
					
						commit
						efafb4d402
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -10,7 +10,7 @@ class User < ActiveRecord::Base
 | 
			
		|||
    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(", ")
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue