We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Given:
class Legato::SiteVisits extend Legato::Model metrics :visits dimensions :date end
I'm manually adding a dimension to a query, like so:
visits = SiteVisits.results(@client.profile, start_date: start_date, end_date: end_date) visits.dimensions << :dimension1 if <some condition> <add filters> rs = visits.collection
I do this because I don't know until runtime which custom dimensions I'll need.
However, when I later create another query:
query = SiteVisits.results(@client.profile, start_date: start_date, end_date: end_date)
query.dimensions shows @elements=[:date, :dimension1]
query.dimensions
@elements=[:date, :dimension1]
I would not expect :dimension1 to be in the dimensions collection.
:dimension1
Not sure if this is a bug, but it's unexpected behaviour.
Any suggestions for fixing or avoiding this would be appreciated. Thanks
The text was updated successfully, but these errors were encountered:
The method used here is modifying the dimension list of the parent class passed to the query.
Garb used to permit passing options to the call to results like :metrics, and :dimensions.
I will fix this so that your use case works, and will make a new issue to reintroduce the feature from Garb.
Sorry, something went wrong.
I just released gem version 0.2.0. Please try your use case again! Thank you!
I can confirm that this fixes the issue. Thanks very much.
No branches or pull requests
Given:
I'm manually adding a dimension to a query, like so:
I do this because I don't know until runtime which custom dimensions I'll need.
However, when I later create another query:
query.dimensions
shows@elements=[:date, :dimension1]
I would not expect
:dimension1
to be in the dimensions collection.Not sure if this is a bug, but it's unexpected behaviour.
Any suggestions for fixing or avoiding this would be appreciated. Thanks
The text was updated successfully, but these errors were encountered: