discourse/app/models
Nick Borromeo b51bebb200 Extract queries to keep logic in the Categories Model
This creates two methods in the Category model. This moves the model
logic to the model and just calls the Category class methods in
ListController.

This also adds tests for the two methods created in the Category
model. The motivation for this refactor is the code climate score of the
this class and readability of the code.

 Please enter the commit message for your changes. Lines starting
2014-02-08 14:10:48 -08:00
..
admin_dashboard_data.rb Rename favorite to starred everywhere 2014-01-10 14:54:19 -05:00
api_key.rb annotate models 2013-12-05 17:40:35 +11:00
cas_user_info.rb
category.rb Extract queries to keep logic in the Categories Model 2014-02-08 14:10:48 -08:00
category_featured_topic.rb Don't include category definitions on Categories page 2014-02-07 17:01:31 -05:00
category_featured_user.rb PERF: optimise featuring of topics and users 2014-01-30 10:32:20 +11:00
category_group.rb
category_list.rb Admins don't see uncategorized on /categories if it has no topics and allow_uncategorized_topics is false 2014-01-15 14:11:36 -05:00
category_search_data.rb
category_user.rb Update annotations 2014-02-07 11:07:52 +11:00
digest_email_site_setting.rb
discourse_version_check.rb
draft.rb
draft_sequence.rb
email_log.rb
email_token.rb
error_log.rb
facebook_user_info.rb
github_user_info.rb
global_setting.rb Source DB config more cleanly, fixes issues with socket in prd 2014-01-15 12:08:35 +11:00
group.rb FEATURE: First stab at groups page with member list 2014-02-07 10:44:51 -05:00
group_user.rb
incoming_link.rb BUGFIX: invalid referer would cause 500 errors 2013-12-30 14:05:44 +11:00
incoming_links_report.rb The Rails JSON encoder API requires as_json to take an optional arg 2013-11-29 21:43:44 -08:00
invite.rb Update annotations 2014-02-07 11:07:52 +11:00
invite_redeemer.rb Trust Level 3: invited users start at default_invitee_trust_level + 1, unless default_invitee_trust_level is 2 or higher 2014-01-17 11:12:00 -05:00
leader_requirements.rb Track how many posts a user reads each day in user_visits 2014-01-27 11:20:19 -05:00
locale_site_setting.rb
min_trust_to_create_topic_setting.rb
notification.rb
oauth2_user_info.rb
optimized_image.rb
plugin_store.rb
plugin_store_row.rb
post.rb Update annotations 2014-02-07 11:07:52 +11:00
post_action.rb
post_action_type.rb
post_alert_observer.rb BUGFIX: emails sent from "2 replies" as opposed to correct user 2014-02-04 12:56:28 +11:00
post_analyzer.rb Work in progress: Swap out onebox code for onebox gem 2014-01-29 14:14:07 -05:00
post_detail.rb annotate models 2013-12-05 17:40:35 +11:00
post_mover.rb
post_reply.rb
post_revision.rb Update annotations 2014-02-07 11:07:52 +11:00
post_search_data.rb
post_timing.rb
post_upload.rb
report.rb Rename favorite to starred everywhere 2014-01-10 14:54:19 -05:00
s3_region_site_setting.rb
screened_email.rb annotate models 2013-12-05 17:40:35 +11:00
screened_ip_address.rb annotate models 2013-12-05 17:40:35 +11:00
screened_url.rb annotate models 2013-12-05 17:40:35 +11:00
search_observer.rb
site.rb BUGFIX: JS error when login_required is enabled 2014-01-20 14:41:11 +01:00
site_content.rb Add site setting tos_accept_required. If enabled, users must check a box saying that they've read and accept the terms of service. 2014-02-07 16:04:13 -05:00
site_content_type.rb FEATURE: allow for custom HTML inside the <head> tags 2014-01-02 16:22:04 +01:00
site_customization.rb Revert "Re-apply with fixes: Stop using user agent to detect mobile devices. Use a media query and yepnope to load the appropriate css and customizations." 2013-12-18 14:47:22 -05:00
site_setting.rb use_ssl is just confusing, it means use_https , fix name of setting 2014-01-09 10:51:38 +11:00
top_lists.rb BUGFIX: show the draft on top page 2014-02-06 11:39:43 +01:00
top_menu_item.rb BUGFIX: proper handling of top_menu_items 2014-02-03 16:08:00 +01:00
top_topic.rb Update annotations 2014-02-07 11:07:52 +11:00
topic.rb Update annotations 2014-02-07 11:07:52 +11:00
topic_allowed_group.rb
topic_allowed_user.rb
topic_embed.rb Update annotations 2014-02-07 11:07:52 +11:00
topic_featured_users.rb
topic_invite.rb
topic_link.rb Rename TopicSummary -> TopicMap 2013-11-18 12:08:21 -05:00
topic_link_click.rb FIX: Incorrect string match 2014-01-14 15:38:12 -05:00
topic_list.rb PERF: optimise featuring of topics and users 2014-01-30 10:32:20 +11:00
topic_notifier.rb FEATURE: mute/watch/track buttons for private conversations 2014-01-22 17:46:52 +11:00
topic_poster.rb
topic_posters_summary.rb
topic_revision.rb Update annotations 2014-02-07 11:07:52 +11:00
topic_status_update.rb FIX: When re-opening a topic that auto-closed, make sure it won't auto-close again 2013-12-19 11:25:05 -05:00
topic_tracking_state.rb fix topic counts not updating automatically in various spots (top menu / categories page / drop down) 2013-11-25 17:37:51 +11:00
topic_user.rb Update annotations 2014-02-07 11:07:52 +11:00
twitter_user_info.rb
upload.rb annotate models 2013-12-05 17:40:35 +11:00
user.rb Link to groups from user profile 2014-02-07 10:44:51 -05:00
user_action.rb SECURITY: reduce moderator rights 2014-02-07 14:11:52 +11:00
user_action_observer.rb FEATURE: collapse replies to topics 2014-02-03 13:59:14 +11:00
user_email_observer.rb
user_history.rb Don't notify about dominating private messages. 2014-02-07 05:49:45 +05:30
user_open_id.rb
user_search.rb
user_search_data.rb
user_stat.rb BUGFIX: UserStat spec was over ambitious with its mocking 2014-01-06 16:50:55 +11:00
user_visit.rb Update annotations 2014-02-07 11:07:52 +11:00
username_validator.rb [0] is shorter than [0,1] :) 2013-12-17 16:30:25 +01:00
view.rb annotate models 2013-12-05 17:40:35 +11:00