New issue
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
Enable Org Pro Dashboard View #2060
Enable Org Pro Dashboard View #2060
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the refactoring 👍 I noticed it's work in progress, but still couldn't resist commenting )
app/facades/pro.rb
Outdated
end | ||
|
||
def last_week_reactions_count | ||
Reaction.where(reactable_id: user_article_ids, reactable_type: "Article").where("created_at > ? AND created_at < ?", 2.weeks.ago, 1.week.ago).size |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tempting to create private methods like reactions_scope
and comments_scope
for the repeating parts, just a suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think I'll do that. There's definitely a better way to organize the mass amount of data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR enables the org pro dashboard view. I decided to leave refactoring and making more data available for the next PR.