lib/tableficate/utils.rb in tableficate-0.3.1 vs lib/tableficate/utils.rb in tableficate-0.3.2
- old
+ new
@@ -15,10 +15,10 @@
(scope.respond_to?(:joins_values) ? scope.joins_values : []) +
(scope.respond_to?(:includes_values) ? scope.includes_values : [])
).uniq.map{|join|
# convert string joins to table names
if join.is_a?(String)
- join.scan(/(?:(?:,|\bjoin\s*)\s*(\w+))/i)
+ join.scan(/\G(?:(?:,|\bjoin\s)\s*(\w+))/i)
else
join
end
}.flatten.map{|table_name|
ActiveRecord::Base::connection_pool.columns[table_name.to_s.tableize]