Commit b1b11d28 authored by Ohad Dahan's avatar Ohad Dahan

Changed Nativepluck.format_order , init str as string, pop out first char which is always ,

parent 247f606d
......@@ -83,9 +83,10 @@ module Nativepluck
end
def self.format_order(order)
str = nil
order.each_pair { |k,v| str.nil? ? str = "#{k} #{v}" : str << ",#{k} #{v}" }
str
str = ''
return str if order.empty?
order.each_pair { |k,v| str << ",#{k} #{v}" }
str[1..-1]
end
module ClassMethods
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment