Commit 12f86f74

mo <mo.khan@gmail.com>
2017-09-25 00:14:52
remove the profiles collection.
1 parent 8b662ee
Changed files (5)
app
app/assets/javascripts/controllers/my/profile_controller.js.coffee
@@ -5,8 +5,7 @@ class csx.Controllers.My.ProfileController extends Marionette.Controller
 
   show: (id) ->
     @selectTab()
-    profile = new csx.Models.Profile
-      id: id
+    profile = new csx.Models.Profile(id: id)
     profile.fetch
       success: =>
         @content_region.show(new @views.ShowView(model: profile))
app/assets/javascripts/models/profile.js.coffee
@@ -32,7 +32,3 @@ class csx.Models.Profile extends Backbone.Model
     return true unless twitter
     regex = /^@?(\w){1,15}$/
     regex.test(twitter)
-
-class csx.Collections.ProfilesCollection extends Backbone.Collection
-  model: csx.Models.Profile
-  url: '/api/v1/profiles'
app/assets/javascripts/cakeside.js.coffee
@@ -51,8 +51,6 @@ window.csx =
         @photos_cache[cake_id] = photos
         photos.fetch(reset: true)
         photos
-    #csx.Application.reqres.setHandler 'ProfilesRepository', =>
-      #@profiles ||= new csx.Collections.ProfilesCollection()
 
     @cakes.fetch(reset: true).done ->
       csx.Application.start()
app/controllers/my/kitchens_controller.rb
@@ -2,7 +2,7 @@ module My
   class KitchensController < BaseController
     def show
       @tags = Tag.unique_tags
-      @cakes = current_user.creations.includes(:category, :photos, :tags, :tag_taggings)
+      #@cakes = current_user.creations.includes(:category, :photos, :tags, :tag_taggings)
       @tutorials = current_user.tutorials.includes(:tags, :tag_taggings)
     end
   end
app/views/my/kitchens/show.html.erb
@@ -10,7 +10,6 @@
 
 <%= backbone_collection_for @categories %>
 <%= backbone_collection_for @tags %>
-<%= backbone_collection_for @cakes %>
 <%= backbone_collection_for @tutorials %>
 
 <%= javascript_tag do %>