lib/gooddata/models/metadata/fact.rb in gooddata-0.6.10 vs lib/gooddata/models/metadata/fact.rb in gooddata-0.6.11

- old
+ new

@@ -30,11 +30,11 @@ # @param [Hash] options the options to pass to the value list # @option options [Symbol] :type type of aggregation function. Default is :sum # @return [GoodData::Metric] def create_metric(options = { :type => :sum }) a_type = options[:type] || :sum - fail "Suggested aggreagtion function (#{a_type}) does not exist for base metric created out of fact. You can use only one of #{FACT_BASE_AGGREGATIONS.map { |x| ":" + x.to_s }.join(',')}" unless FACT_BASE_AGGREGATIONS.include?(a_type) + fail "Suggested aggreagtion function (#{a_type}) does not exist for base metric created out of fact. You can use only one of #{FACT_BASE_AGGREGATIONS.map { |x| ':' + x.to_s }.join(',')}" unless FACT_BASE_AGGREGATIONS.include?(a_type) a_title = options[:title] || "#{a_type} of #{title}" - Metric.xcreate("SELECT #{a_type.to_s.upcase}(![#{identifier}])", :title => a_title, :client => client, :project => project) + project.create_metric("SELECT #{a_type.to_s.upcase}([#{uri}])", title: a_title, extended_notation: false) end end end