Method: Puffs::SQLRelation#order_by_string
- Defined in:
- lib/relation.rb
#order_by_string ⇒ Object
155 156 157 158 159 160 161 |
# File 'lib/relation.rb', line 155 def order_by_string hash_string = order_params_hash.map do |column, asc_desc| "#{column} #{asc_desc.to_s.upcase}" end.join(', ') hash_string.empty? ? '' : "ORDER BY #{hash_string}" end |