app/models/user.rb
# Only returns owned tables (not shared ones)
Only returns owned tables (not shared ones)
Only returns owned tables ( not shared ones )
def table_count(privacy_filter=nil)
    filter = {
        user_id: self.id
    }
    filter[:privacy] = privacy_filter unless privacy_filter.nil?
    Table.filter(filter).count
  end
def table_count ( privacy_filter = nil ) filter = { user_id : self . id } filter [ :privacy ] = privacy_filter unless privacy_filter . nil? Table . filter ( filter ) . count end
Only returns owned tables (not shared ones)
Only returns owned tables ( not shared ones )
privacy_filter