diff --git a/app/assets/javascripts/admin/controllers/admin-embedding.js.es6 b/app/assets/javascripts/admin/controllers/admin-embedding.js.es6 index b73a8c03544..266aa6975e6 100644 --- a/app/assets/javascripts/admin/controllers/admin-embedding.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-embedding.js.es6 @@ -9,7 +9,7 @@ export default Ember.Controller.extend({ @computed('embedding.embeddable_hosts.@each.isCreated') showSecondary() { const hosts = this.get('embedding.embeddable_hosts'); - return hosts.length && hosts.findProperty('isCreated'); + return hosts.length && hosts.findBy('isCreated'); }, @computed('embedding.base_url') diff --git a/app/assets/javascripts/admin/controllers/admin-site-settings-category.js.es6 b/app/assets/javascripts/admin/controllers/admin-site-settings-category.js.es6 index 407deac692f..df0738bed18 100644 --- a/app/assets/javascripts/admin/controllers/admin-site-settings-category.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-site-settings-category.js.es6 @@ -5,7 +5,7 @@ export default Ember.Controller.extend({ filteredContent: function() { if (!this.get('categoryNameKey')) { return []; } - const category = (this.get('adminSiteSettings.model') || []).findProperty('nameKey', this.get('categoryNameKey')); + const category = (this.get('adminSiteSettings.model') || []).findBy('nameKey', this.get('categoryNameKey')); if (category) { return category.siteSettings; } else { diff --git a/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 b/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 index d3ea899d81b..1d877dadaf5 100644 --- a/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 +++ b/app/assets/javascripts/admin/controllers/admin-users-list-show.js.es6 @@ -19,7 +19,7 @@ export default Ember.Controller.extend({ selectedCount: function() { var model = this.get('model'); if (!model || !model.length) return 0; - return model.filterProperty('selected').length; + return model.filterBy('selected').length; }.property('model.@each.selected'), selectAllChanged: function() { @@ -52,14 +52,14 @@ export default Ember.Controller.extend({ actions: { approveUsers: function() { - AdminUser.bulkApprove(this.get('model').filterProperty('selected')); + AdminUser.bulkApprove(this.get('model').filterBy('selected')); this._refreshUsers(); }, rejectUsers: function() { var maxPostAge = this.siteSettings.delete_user_max_post_age; var controller = this; - AdminUser.bulkReject(this.get('model').filterProperty('selected')).then(function(result){ + AdminUser.bulkReject(this.get('model').filterBy('selected')).then(function(result){ var message = I18n.t("admin.users.reject_successful", {count: result.success}); if (result.failed > 0) { message += ' ' + I18n.t("admin.users.reject_failures", {count: result.failed}); diff --git a/app/assets/javascripts/admin/routes/admin-badges-show.js.es6 b/app/assets/javascripts/admin/routes/admin-badges-show.js.es6 index 03d091d228d..537fdcfda8e 100644 --- a/app/assets/javascripts/admin/routes/admin-badges-show.js.es6 +++ b/app/assets/javascripts/admin/routes/admin-badges-show.js.es6 @@ -13,7 +13,7 @@ export default Ember.Route.extend({ name: I18n.t('admin.badges.new_badge') }); } - return this.modelFor('adminBadges').findProperty('id', parseInt(params.badge_id)); + return this.modelFor('adminBadges').findBy('id', parseInt(params.badge_id)); }, actions: { diff --git a/app/assets/javascripts/admin/routes/admin-customize-css-html-show.js.es6 b/app/assets/javascripts/admin/routes/admin-customize-css-html-show.js.es6 index dc38f3c51fb..7df829706fd 100644 --- a/app/assets/javascripts/admin/routes/admin-customize-css-html-show.js.es6 +++ b/app/assets/javascripts/admin/routes/admin-customize-css-html-show.js.es6 @@ -1,7 +1,7 @@ export default Ember.Route.extend({ model(params) { const all = this.modelFor('adminCustomizeCssHtml'); - const model = all.findProperty('id', parseInt(params.site_customization_id)); + const model = all.findBy('id', parseInt(params.site_customization_id)); return model ? { model, section: params.section } : this.replaceWith('adminCustomizeCssHtml.index'); }, diff --git a/app/assets/javascripts/admin/routes/admin-customize-email-templates-edit.js.es6 b/app/assets/javascripts/admin/routes/admin-customize-email-templates-edit.js.es6 index b6e4e36bf9f..7c759995fb4 100644 --- a/app/assets/javascripts/admin/routes/admin-customize-email-templates-edit.js.es6 +++ b/app/assets/javascripts/admin/routes/admin-customize-email-templates-edit.js.es6 @@ -3,7 +3,7 @@ import { scrollTop } from 'discourse/mixins/scroll-top'; export default Ember.Route.extend({ model(params) { const all = this.modelFor('adminCustomizeEmailTemplates'); - return all.findProperty('id', params.id); + return all.findBy('id', params.id); }, setupController(controller, emailTemplate) { diff --git a/app/assets/javascripts/admin/routes/admin-group.js.es6 b/app/assets/javascripts/admin/routes/admin-group.js.es6 index 298bffaa434..3575496edd4 100644 --- a/app/assets/javascripts/admin/routes/admin-group.js.es6 +++ b/app/assets/javascripts/admin/routes/admin-group.js.es6 @@ -7,8 +7,7 @@ export default Discourse.Route.extend({ return Group.create({ automatic: false, visible: true }); } - const group = this.modelFor('adminGroupsType') - .findProperty('name', params.name); + const group = this.modelFor('adminGroupsType').findBy('name', params.name); if (!group) { return this.transitionTo('adminGroups.index'); } diff --git a/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 b/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 index 6b08494f4f4..d7cdc327445 100644 --- a/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 +++ b/app/assets/javascripts/discourse/components/basic-topic-list.js.es6 @@ -47,7 +47,7 @@ export default Ember.Component.extend({ target = target.find('a'); } - const topic = this.get('topics').findProperty('id', parseInt(topicId)); + const topic = this.get('topics').findBy('id', parseInt(topicId)); this.sendAction('postsAction', {topic, position: target.offset()}); } return false; diff --git a/app/assets/javascripts/discourse/components/composer-editor.js.es6 b/app/assets/javascripts/discourse/components/composer-editor.js.es6 index 79c7eb7d893..6503e051c29 100644 --- a/app/assets/javascripts/discourse/components/composer-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/composer-editor.js.es6 @@ -50,7 +50,7 @@ export default Ember.Component.extend({ const posts = topic.get('postStream.posts'); if (posts && topicId === topic.get('id')) { - const quotedPost = posts.findProperty("post_number", postNumber); + const quotedPost = posts.findBy("post_number", postNumber); if (quotedPost) { return tinyAvatar(quotedPost.get('avatar_template')); } diff --git a/app/assets/javascripts/discourse/components/d-editor.js.es6 b/app/assets/javascripts/discourse/components/d-editor.js.es6 index 83675997432..30759cac150 100644 --- a/app/assets/javascripts/discourse/components/d-editor.js.es6 +++ b/app/assets/javascripts/discourse/components/d-editor.js.es6 @@ -123,7 +123,7 @@ class Toolbar { } addButton(button) { - const g = this.groups.findProperty('group', button.group); + const g = this.groups.findBy('group', button.group); if (!g) { throw `Couldn't find toolbar group ${button.group}`; } diff --git a/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 b/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 index 413085aef80..8796a7bc141 100644 --- a/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 +++ b/app/assets/javascripts/discourse/components/topic-footer-mobile-dropdown.js.es6 @@ -27,7 +27,7 @@ export default Combobox.extend({ } this.comboTemplate = (item) => { - const contentItem = content.findProperty('id', item.id); + const contentItem = content.findBy('id', item.id); if (!contentItem) { return item.text; } return `${iconHTML(contentItem.icon)}  ${item.text}`; }; diff --git a/app/assets/javascripts/discourse/controllers/composer.js.es6 b/app/assets/javascripts/discourse/controllers/composer.js.es6 index 49473cc70bc..30a5c7af93a 100644 --- a/app/assets/javascripts/discourse/controllers/composer.js.es6 +++ b/app/assets/javascripts/discourse/controllers/composer.js.es6 @@ -618,10 +618,10 @@ export default Ember.Controller.extend({ let category; if (!splitCategory[1]) { - category = this.site.get('categories').findProperty('nameLower', splitCategory[0].toLowerCase()); + category = this.site.get('categories').findBy('nameLower', splitCategory[0].toLowerCase()); } else { const categories = Discourse.Category.list(); - const mainCategory = categories.findProperty('nameLower', splitCategory[0].toLowerCase()); + const mainCategory = categories.findBy('nameLower', splitCategory[0].toLowerCase()); category = categories.find(function(item) { return item && item.get('nameLower') === splitCategory[1].toLowerCase() && item.get('parent_category_id') === mainCategory.id; }); diff --git a/app/assets/javascripts/discourse/controllers/create-account.js.es6 b/app/assets/javascripts/discourse/controllers/create-account.js.es6 index b3d04dd7496..3135eb0f952 100644 --- a/app/assets/javascripts/discourse/controllers/create-account.js.es6 +++ b/app/assets/javascripts/discourse/controllers/create-account.js.es6 @@ -56,7 +56,7 @@ export default Ember.Controller.extend(ModalFunctionality, { // Validate required fields let userFields = this.get('userFields'); - if (userFields) { userFields = userFields.filterProperty('field.required'); } + if (userFields) { userFields = userFields.filterBy('field.required'); } if (!Ember.isEmpty(userFields)) { const anyEmpty = userFields.any(function(uf) { const val = uf.get('value'); diff --git a/app/assets/javascripts/discourse/controllers/flag.js.es6 b/app/assets/javascripts/discourse/controllers/flag.js.es6 index a5119b383e0..760390d3d41 100644 --- a/app/assets/javascripts/discourse/controllers/flag.js.es6 +++ b/app/assets/javascripts/discourse/controllers/flag.js.es6 @@ -20,7 +20,7 @@ export default Ember.Controller.extend(ModalFunctionality, { let flagsAvailable = this.get('model.flagsAvailable'); // "message user" option should be at the top - const notifyUserIndex = flagsAvailable.indexOf(flagsAvailable.filterProperty('name_key', 'notify_user')[0]); + const notifyUserIndex = flagsAvailable.indexOf(flagsAvailable.filterBy('name_key', 'notify_user')[0]); if (notifyUserIndex !== -1) { const notifyUser = flagsAvailable[notifyUserIndex]; flagsAvailable.splice(notifyUserIndex, 1); @@ -93,7 +93,7 @@ export default Ember.Controller.extend(ModalFunctionality, { let postAction; // an instance of ActionSummary if (!this.get('flagTopic')) { - postAction = this.get('model.actions_summary').findProperty('id', this.get('selected.id')); + postAction = this.get('model.actions_summary').findBy('id', this.get('selected.id')); } else { postAction = this.get('topicActionByName.' + this.get('selected.name_key')); } diff --git a/app/assets/javascripts/discourse/controllers/login.js.es6 b/app/assets/javascripts/discourse/controllers/login.js.es6 index ecde7b9f8ec..1996e723b69 100644 --- a/app/assets/javascripts/discourse/controllers/login.js.es6 +++ b/app/assets/javascripts/discourse/controllers/login.js.es6 @@ -186,7 +186,7 @@ export default Ember.Controller.extend(ModalFunctionality, { authMessage: (function() { if (Ember.isEmpty(this.get('authenticate'))) return ""; - const method = findAll(this.siteSettings, this.capabilities, this.isMobileDevice).findProperty("name", this.get("authenticate")); + const method = findAll(this.siteSettings, this.capabilities, this.isMobileDevice).findBy("name", this.get("authenticate")); if(method){ return method.get('message'); } diff --git a/app/assets/javascripts/discourse/controllers/preferences.js.es6 b/app/assets/javascripts/discourse/controllers/preferences.js.es6 index f9077e6e434..4e963365633 100644 --- a/app/assets/javascripts/discourse/controllers/preferences.js.es6 +++ b/app/assets/javascripts/discourse/controllers/preferences.js.es6 @@ -25,7 +25,7 @@ export default Ember.Controller.extend(CanCheckEmails, { // Staff can edit fields that are not `editable` if (!this.get('currentUser.staff')) { - siteUserFields = siteUserFields.filterProperty('editable', true); + siteUserFields = siteUserFields.filterBy('editable', true); } return siteUserFields.sortBy('position').map(function(field) { const value = userFields ? userFields[field.get('id').toString()] : null; diff --git a/app/assets/javascripts/discourse/controllers/topic.js.es6 b/app/assets/javascripts/discourse/controllers/topic.js.es6 index e4c5d23973f..7d678a57fc5 100644 --- a/app/assets/javascripts/discourse/controllers/topic.js.es6 +++ b/app/assets/javascripts/discourse/controllers/topic.js.es6 @@ -765,7 +765,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { const selectedReplies = this.get('selectedReplies'); selectedReplies.removeObject(post); - const selectedReply = selectedReplies.findProperty('post_number', post.get('reply_to_post_number')); + const selectedReply = selectedReplies.findBy('post_number', post.get('reply_to_post_number')); if (selectedReply) { selectedReplies.removeObject(selectedReply); } this.set('allPostsSelected', false); @@ -774,7 +774,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, { postSelected(post) { if (this.get('allPostsSelected')) { return true; } if (this.get('selectedPosts').contains(post)) { return true; } - if (this.get('selectedReplies').findProperty('post_number', post.get('reply_to_post_number'))) { return true; } + if (this.get('selectedReplies').findBy('post_number', post.get('reply_to_post_number'))) { return true; } return false; }, diff --git a/app/assets/javascripts/discourse/controllers/user-card.js.es6 b/app/assets/javascripts/discourse/controllers/user-card.js.es6 index 1a2cdd78125..f7d7da11ad1 100644 --- a/app/assets/javascripts/discourse/controllers/user-card.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user-card.js.es6 @@ -41,7 +41,7 @@ export default Ember.Controller.extend({ const siteUserFields = this.site.get('user_fields'); if (!Ember.isEmpty(siteUserFields)) { const userFields = this.get('user.user_fields'); - return siteUserFields.filterProperty('show_on_user_card', true).sortBy('position').map(field => { + return siteUserFields.filterBy('show_on_user_card', true).sortBy('position').map(field => { Ember.set(field, 'dasherized_name', field.get('name').dasherize()); const value = userFields ? userFields[field.get('id')] : null; return Ember.isEmpty(value) ? null : Ember.Object.create({ value, field }); diff --git a/app/assets/javascripts/discourse/controllers/user.js.es6 b/app/assets/javascripts/discourse/controllers/user.js.es6 index d2965681817..3d367afe40b 100644 --- a/app/assets/javascripts/discourse/controllers/user.js.es6 +++ b/app/assets/javascripts/discourse/controllers/user.js.es6 @@ -76,7 +76,7 @@ export default Ember.Controller.extend(CanCheckEmails, { const siteUserFields = this.site.get('user_fields'); if (!Ember.isEmpty(siteUserFields)) { const userFields = this.get('model.user_fields'); - return siteUserFields.filterProperty('show_on_profile', true).sortBy('position').map(field => { + return siteUserFields.filterBy('show_on_profile', true).sortBy('position').map(field => { field.dasherized_name = field.get('name').dasherize(); const value = userFields ? userFields[field.get('id').toString()] : null; return Ember.isEmpty(value) ? null : Ember.Object.create({ value, field }); diff --git a/app/assets/javascripts/discourse/lib/emoji/toolbar.js.es6 b/app/assets/javascripts/discourse/lib/emoji/toolbar.js.es6 index fff8079cf36..68e95281849 100644 --- a/app/assets/javascripts/discourse/lib/emoji/toolbar.js.es6 +++ b/app/assets/javascripts/discourse/lib/emoji/toolbar.js.es6 @@ -68,7 +68,7 @@ function initializeRecentlyUsedIcons() { recent.forEach(emoji => recentlyUsedIcons.push(emoji.title)); - const recentGroup = groups.findProperty('name', 'recent'); + const recentGroup = groups.findBy('name', 'recent'); if (recentGroup) { recentGroup.icons = recentlyUsedIcons; } else { diff --git a/app/assets/javascripts/discourse/lib/search.js.es6 b/app/assets/javascripts/discourse/lib/search.js.es6 index c4e9567b83b..9dc3b38e2f1 100644 --- a/app/assets/javascripts/discourse/lib/search.js.es6 +++ b/app/assets/javascripts/discourse/lib/search.js.es6 @@ -37,7 +37,7 @@ export function translateResults(results, opts) { }); results.categories = results.categories.map(function(category){ - return Category.list().findProperty('id', category.id); + return Category.list().findBy('id', category.id); }).compact(); const r = results.grouped_search_result; diff --git a/app/assets/javascripts/discourse/models/composer.js.es6 b/app/assets/javascripts/discourse/models/composer.js.es6 index 511f4ea853f..3bfdcc904ae 100644 --- a/app/assets/javascripts/discourse/models/composer.js.es6 +++ b/app/assets/javascripts/discourse/models/composer.js.es6 @@ -118,7 +118,7 @@ const Composer = RestModel.extend({ }.property().volatile(), archetype: function() { - return this.get('archetypes').findProperty('id', this.get('archetypeId')); + return this.get('archetypes').findBy('id', this.get('archetypeId')); }.property('archetypeId'), archetypeChanged: function() { @@ -378,14 +378,14 @@ const Composer = RestModel.extend({ // If the user didn't change the template, clear it if (oldCategoryId) { - const oldCat = this.site.categories.findProperty('id', oldCategoryId); + const oldCat = this.site.categories.findBy('id', oldCategoryId); if (oldCat && (oldCat.get('topic_template') === reply)) { reply = ""; } } if (!Ember.isEmpty(reply)) { return; } - const category = this.site.categories.findProperty('id', categoryId); + const category = this.site.categories.findBy('id', categoryId); if (category) { this.set('reply', category.get('topic_template') || ""); } diff --git a/app/assets/javascripts/discourse/models/nav-item.js.es6 b/app/assets/javascripts/discourse/models/nav-item.js.es6 index 7eb1616485b..58845c2d51f 100644 --- a/app/assets/javascripts/discourse/models/nav-item.js.es6 +++ b/app/assets/javascripts/discourse/models/nav-item.js.es6 @@ -29,7 +29,7 @@ const NavItem = Discourse.Model.extend({ categorySlug: function() { var split = this.get('name').split('/'); if (split[0] === 'category' && split[1]) { - var cat = Discourse.Site.current().categories.findProperty('nameLower', split[1].toLowerCase()); + var cat = Discourse.Site.current().categories.findBy('nameLower', split[1].toLowerCase()); return cat ? Discourse.Category.slugFor(cat) : null; } return null; diff --git a/app/assets/javascripts/discourse/models/post-stream.js.es6 b/app/assets/javascripts/discourse/models/post-stream.js.es6 index a96f0e0248a..2473b6660b6 100644 --- a/app/assets/javascripts/discourse/models/post-stream.js.es6 +++ b/app/assets/javascripts/discourse/models/post-stream.js.es6 @@ -59,7 +59,7 @@ export default RestModel.extend({ @computed('hasLoadedData', 'firstPostId', 'posts.[]') firstPostPresent(hasLoadedData, firstPostId) { if (!hasLoadedData) { return false; } - return !!this.get('posts').findProperty('id', firstPostId); + return !!this.get('posts').findBy('id', firstPostId); }, firstPostNotLoaded: Ember.computed.not('firstPostPresent'), @@ -71,7 +71,7 @@ export default RestModel.extend({ if (!hasLoadedData) { return false; } if (lastPostId === -1) { return true; } - return !!this.get('posts').findProperty('id', lastPostId); + return !!this.get('posts').findBy('id', lastPostId); }, lastPostNotLoaded: Ember.computed.not('loadedAllPosts'), @@ -208,7 +208,7 @@ export default RestModel.extend({ if (opts.forceLoad) { this.set('loaded', false); } else { - const postWeWant = this.get('posts').findProperty('post_number', opts.nearPost); + const postWeWant = this.get('posts').findBy('post_number', opts.nearPost); if (postWeWant) { return Ember.RSVP.resolve(); } } diff --git a/app/assets/javascripts/discourse/models/post.js.es6 b/app/assets/javascripts/discourse/models/post.js.es6 index 7e96dc3ba11..b15683ca4a4 100644 --- a/app/assets/javascripts/discourse/models/post.js.es6 +++ b/app/assets/javascripts/discourse/models/post.js.es6 @@ -76,7 +76,7 @@ const Post = RestModel.extend({ internalLinks: function() { if (Ember.isEmpty(this.get('link_counts'))) return null; - return this.get('link_counts').filterProperty('internal').filterProperty('title'); + return this.get('link_counts').filterBy('internal').filterBy('title'); }.property('link_counts.@each.internal'), flagsAvailable: function() { diff --git a/app/assets/javascripts/discourse/models/site.js.es6 b/app/assets/javascripts/discourse/models/site.js.es6 index eb417c74290..5b421c46bee 100644 --- a/app/assets/javascripts/discourse/models/site.js.es6 +++ b/app/assets/javascripts/discourse/models/site.js.es6 @@ -20,7 +20,7 @@ const Site = RestModel.extend({ flagTypes() { const postActionTypes = this.get('post_action_types'); if (!postActionTypes) return []; - return postActionTypes.filterProperty('is_flag', true); + return postActionTypes.filterBy('is_flag', true); }, topicCountDesc: ['topic_count:desc'], @@ -64,7 +64,7 @@ const Site = RestModel.extend({ removeCategory(id) { const categories = this.get('categories'); - const existingCategory = categories.findProperty('id', id); + const existingCategory = categories.findBy('id', id); if (existingCategory) { categories.removeObject(existingCategory); delete this.get('categoriesById').categoryId; @@ -74,7 +74,7 @@ const Site = RestModel.extend({ updateCategory(newCategory) { const categories = this.get('categories'); const categoryId = Em.get(newCategory, 'id'); - const existingCategory = categories.findProperty('id', categoryId); + const existingCategory = categories.findBy('id', categoryId); // Don't update null permissions if (newCategory.permission === null) { delete newCategory.permission; } diff --git a/app/assets/javascripts/discourse/models/topic-details.js.es6 b/app/assets/javascripts/discourse/models/topic-details.js.es6 index 25714b0c4b4..72ef0d0fe9d 100644 --- a/app/assets/javascripts/discourse/models/topic-details.js.es6 +++ b/app/assets/javascripts/discourse/models/topic-details.js.es6 @@ -72,7 +72,7 @@ const TopicDetails = RestModel.extend({ type: 'PUT', data: { name: name } }).then(() => { - groups.removeObject(groups.findProperty('name', name)); + groups.removeObject(groups.findBy('name', name)); }); }, @@ -84,7 +84,7 @@ const TopicDetails = RestModel.extend({ type: 'PUT', data: { username: username } }).then(() => { - users.removeObject(users.findProperty('username', username)); + users.removeObject(users.findBy('username', username)); }); } }); diff --git a/app/assets/javascripts/discourse/models/topic.js.es6 b/app/assets/javascripts/discourse/models/topic.js.es6 index 15b181fae88..e59c60029dc 100644 --- a/app/assets/javascripts/discourse/models/topic.js.es6 +++ b/app/assets/javascripts/discourse/models/topic.js.es6 @@ -120,7 +120,7 @@ const Topic = RestModel.extend({ const categoryName = this.get('categoryName'); let category; if (categoryName) { - category = Discourse.Category.list().findProperty('name', categoryName); + category = Discourse.Category.list().findBy('name', categoryName); } this.set('category', category); }.observes('categoryName'), @@ -213,7 +213,7 @@ const Topic = RestModel.extend({ }.property('views'), archetypeObject: function() { - return Discourse.Site.currentProp('archetypes').findProperty('id', this.get('archetype')); + return Discourse.Site.currentProp('archetypes').findBy('id', this.get('archetype')); }.property('archetype'), isPrivateMessage: Em.computed.equal('archetype', 'private_message'), diff --git a/app/assets/javascripts/discourse/models/user.js.es6 b/app/assets/javascripts/discourse/models/user.js.es6 index ede02127a32..6328ca9ca81 100644 --- a/app/assets/javascripts/discourse/models/user.js.es6 +++ b/app/assets/javascripts/discourse/models/user.js.es6 @@ -153,7 +153,7 @@ const User = RestModel.extend({ @computed("trust_level") trustLevel(trustLevel) { - return Discourse.Site.currentProp('trustLevels').findProperty('id', parseInt(trustLevel, 10)); + return Discourse.Site.currentProp('trustLevels').findBy('id', parseInt(trustLevel, 10)); }, isBasic: Em.computed.equal('trust_level', 0), @@ -525,7 +525,7 @@ User.reopenClass(Singleton, { action_type: UserAction.TYPES.replies }); - stats.filterProperty('isResponse').forEach(stat => { + stats.filterBy('isResponse').forEach(stat => { responses.set('count', responses.get('count') + stat.get('count')); }); diff --git a/app/assets/javascripts/discourse/widgets/post.js.es6 b/app/assets/javascripts/discourse/widgets/post.js.es6 index f6f50d03f6e..7e9fd93496c 100644 --- a/app/assets/javascripts/discourse/widgets/post.js.es6 +++ b/app/assets/javascripts/discourse/widgets/post.js.es6 @@ -463,11 +463,11 @@ export default createWidget('post', { undoPostAction(typeId) { const post = this.model; - return post.get('actions_summary').findProperty('id', typeId).undo(post); + return post.get('actions_summary').findBy('id', typeId).undo(post); }, deferPostActionFlags(typeId) { const post = this.model; - return post.get('actions_summary').findProperty('id', typeId).deferFlags(post); + return post.get('actions_summary').findBy('id', typeId).deferFlags(post); } }); diff --git a/app/assets/javascripts/wizard/components/invite-list-user.js.es6 b/app/assets/javascripts/wizard/components/invite-list-user.js.es6 index c54290fb835..1f8396bcc37 100644 --- a/app/assets/javascripts/wizard/components/invite-list-user.js.es6 +++ b/app/assets/javascripts/wizard/components/invite-list-user.js.es6 @@ -5,7 +5,7 @@ export default Ember.Component.extend({ @computed('user.role') roleName(role) { - return this.get('roles').findProperty('id', role).label; + return this.get('roles').findBy('id', role).label; }, actions: { diff --git a/app/assets/javascripts/wizard/components/invite-list.js.es6 b/app/assets/javascripts/wizard/components/invite-list.js.es6 index 6786458b5f6..c3eb9be06e0 100644 --- a/app/assets/javascripts/wizard/components/invite-list.js.es6 +++ b/app/assets/javascripts/wizard/components/invite-list.js.es6 @@ -48,7 +48,7 @@ export default Ember.Component.extend({ } const users = this.get('users'); - if (users.findProperty('email', user.email)) { + if (users.findBy('email', user.email)) { return this.set('invalid', true); } diff --git a/app/assets/javascripts/wizard/models/step.js.es6 b/app/assets/javascripts/wizard/models/step.js.es6 index 2d6e9b3532b..368e6f0f0ce 100644 --- a/app/assets/javascripts/wizard/models/step.js.es6 +++ b/app/assets/javascripts/wizard/models/step.js.es6 @@ -33,7 +33,7 @@ export default Ember.Object.extend(ValidState, { }, fieldError(id, description) { - const field = this.get('fields').findProperty('id', id); + const field = this.get('fields').findBy('id', id); if (field) { field.setValid(false, description); } diff --git a/app/assets/javascripts/wizard/models/wizard.js.es6 b/app/assets/javascripts/wizard/models/wizard.js.es6 index 68a4f56c6fd..d98ba5e51ee 100644 --- a/app/assets/javascripts/wizard/models/wizard.js.es6 +++ b/app/assets/javascripts/wizard/models/wizard.js.es6 @@ -8,13 +8,13 @@ const Wizard = Ember.Object.extend({ totalSteps: length => length, getTitle() { - const titleStep = this.get('steps').findProperty('id', 'forum-title'); + const titleStep = this.get('steps').findBy('id', 'forum-title'); if (!titleStep) { return; } return titleStep.get('fieldsById.title.value'); }, getLogoUrl() { - const logoStep = this.get('steps').findProperty('id', 'logos'); + const logoStep = this.get('steps').findBy('id', 'logos'); if (!logoStep) { return; } return logoStep.get('fieldsById.logo_url.value'); @@ -22,7 +22,7 @@ const Wizard = Ember.Object.extend({ // A bit clunky, but get the current colors from the appropriate step getCurrentColors() { - const colorStep = this.get('steps').findProperty('id', 'colors'); + const colorStep = this.get('steps').findBy('id', 'colors'); if (!colorStep) { return; } const themeChoice = colorStep.get('fieldsById.theme_id'); @@ -34,7 +34,7 @@ const Wizard = Ember.Object.extend({ const choices = themeChoice.get('choices'); if (!choices) { return; } - const option = choices.findProperty('id', themeId); + const option = choices.findBy('id', themeId); if (!option) { return; } return option.data.colors; diff --git a/app/assets/javascripts/wizard/routes/step.js.es6 b/app/assets/javascripts/wizard/routes/step.js.es6 index 152bf7a497b..1648651a692 100644 --- a/app/assets/javascripts/wizard/routes/step.js.es6 +++ b/app/assets/javascripts/wizard/routes/step.js.es6 @@ -1,7 +1,7 @@ export default Ember.Route.extend({ model(params) { const allSteps = this.modelFor('application').steps; - const step = allSteps.findProperty('id', params.step_id); + const step = allSteps.findBy('id', params.step_id); return step ? step : allSteps[0]; },