* Adjust active_threads class method to display posts in homepage sidebar * WIP: add specs around active_threads class method * Uses newer AR query syntax in Article#active_threads * WIP: Updates article_spec.rb to get tests passing * WIP: Adjust test to return articles that dont fall into constraints * Adjusts spec to update articles properly * Adjust article.update_columns to match initial article columns * Extracts .active_threads into a query object and removes class method - Removes class method from Article model - Removes class method tests from article_spec.rb - Adds Articles::ActiveThreadsQuery to app/queries/articles - Adds active_threads_query_spec.rb to spec/queries/articles - Replaces Article.active_threads with Articles::ActiveThreadsQuery in _homepage_content.html.erb and _sidebar_activity.html.erb - General code clean up * Rename number to count in Articles::ActiveThreadsQuery * WIP new specs * Update spec * Repleaces let! with before block to appease rubocop * Refactors Articles::ActiveThreadsQuery#call per PR review suggestion * Calls Articles::ActiveThreadsQuery within articles_helper instead of view Co-authored-by: Mac Siri <krairit.siri@gmail.com> |
||
|---|---|---|
| .. | ||
| admin | ||
| articles | ||