lib/gooddata/models/model.rb in gooddata-0.6.19 vs lib/gooddata/models/model.rb in gooddata-0.6.20
- old
+ new
@@ -91,11 +91,11 @@
DEFAULT_DATE_FORMAT = 'MM/dd/yyyy'
class << self
def title(item)
- item[:title] || item[:id].titleize
+ item[:title] || GoodData::Helpers.titleize(item[:id])
end
def column_name(item)
item[:column_name] || item[:id]
end
@@ -220,10 +220,10 @@
end
def merge_dataset_columns(a_schema_blueprint, b_schema_blueprint)
a_schema_blueprint = a_schema_blueprint.to_hash
b_schema_blueprint = b_schema_blueprint.to_hash
- d = a_schema_blueprint.deep_dup
+ d = GoodData::Helpers.deep_dup(a_schema_blueprint)
d[:columns] = d[:columns] + b_schema_blueprint[:columns]
d[:columns].uniq!
columns_that_failed_to_merge = d[:columns].group_by { |x| [:reference, :date].include?(x[:type]) ? x[:dataset] : x[:id] }.map { |k, v| [k, v.count, v] }.select { |x| x[1] > 1 }
unless columns_that_failed_to_merge.empty?
columns_that_failed_to_merge.each do |error|