app/models/user.rb
def visualization_count(type_filter=nil, privacy_filter=nil, exclude_shared=false)
    parameters = {
      user_id: self.id
    }
    parameters[:type] = type_filter unless type_filter.nil?
    parameters[:privacy] = privacy_filter unless privacy_filter.nil?
    parameters[:exclude_shared] = true if exclude_shared
    parameters[:per_page] = CartoDB::Visualization::Collection::ALL_RECORDS

    CartoDB::Visualization::Collection.new.fetch(parameters).count
  end
# Get a count of visualizations with optional type and privacy filters
Get a count of visualizations with optional type and privacy filters
Get a count of visualizations with optional type and privacy filters
def visualization_count(type_filter=nil, privacy_filter=nil, exclude_shared=false)
    parameters = {
      user_id: self.id
    }
    parameters[:type] = type_filter unless type_filter.nil?
    parameters[:privacy] = privacy_filter unless privacy_filter.nil?
    parameters[:exclude_shared] = true if exclude_shared
    parameters[:per_page] = CartoDB::Visualization::Collection::ALL_RECORDS
    CartoDB::Visualization::Collection.new.fetch(parameters).count
  end
def visualization_count ( type_filter = nil , privacy_filter = nil , exclude_shared = false ) parameters = { user_id : self . id } parameters [ :type ] = type_filter unless type_filter . nil? parameters [ :privacy ] = privacy_filter unless privacy_filter . nil? parameters [ :exclude_shared ] = true if exclude_shared parameters [ :per_page ] = CartoDB :: Visualization :: Collection :: ALL_RECORDS CartoDB :: Visualization :: Collection . new . fetch ( parameters ) . count end
Get a count of visualizations with optional type and privacy filters
Get a count of visualizations with optional type and privacy filters
type_filter
privacy_filter
exclude_shared