lib/active_house/selectable.rb in active_house-0.1.3 vs lib/active_house/selectable.rb in active_house-0.1.4
- old
+ new
@@ -5,15 +5,13 @@
included do
private
def build_select_query_part
if !@fields.empty?
- query_data = ['SELECT']
- query_data.concat @fields
+ "SELECT\n#{@fields.join(",\n")}"
else
- query_data = ['SELECT *']
+ 'SELECT *'
end
- query_data.join("\n")
end
end
def initialize(*)
@fields = []