lib/gooddata/models/blueprint/dataset_blueprint.rb in gooddata-0.6.19 vs lib/gooddata/models/blueprint/dataset_blueprint.rb in gooddata-0.6.20
- old
+ new
@@ -241,11 +241,11 @@
# Duplicates the DatasetBlueprint. It is done as a deep duplicate
#
# @return [GoodData::Model::DatasetBlueprint] matching fields
def dup
- DatasetBlueprint.new(data.deep_dup, project_blueprint)
+ DatasetBlueprint.new(GoodData::Helpers.deep_dup(data), project_blueprint)
end
# Returns facts of a dataset
#
# @return [Array<Hash>] returns the attribute or an empty array
@@ -365,10 +365,10 @@
# @return [Array<GoodData::Metric>] matching fields
def suggest_metrics
identifiers = facts.map { |f| identifier_for(f) }
identifiers.zip(facts).map do |id, fact|
Metric.xcreate(
- :title => fact[:name].titleize,
+ :title => GoodData::Helpers.titleize(fact[:name]),
:expression => "SELECT SUM(![#{id}])")
end
end
def to_blueprint