Commit 8b662ee9
Changed files (2)
app
assets
javascripts
spec
helpers
app/assets/javascripts/cakeside.js.coffee
@@ -51,8 +51,8 @@ window.csx =
@photos_cache[cake_id] = photos
photos.fetch(reset: true)
photos
- csx.Application.reqres.setHandler 'ProfilesRepository', =>
- @profiles ||= new csx.Collections.ProfilesCollection()
+ #csx.Application.reqres.setHandler 'ProfilesRepository', =>
+ #@profiles ||= new csx.Collections.ProfilesCollection()
@cakes.fetch(reset: true).done ->
csx.Application.start()
spec/helpers/application_helper_spec.rb
@@ -3,17 +3,17 @@ require "rails_helper"
describe ApplicationHelper do
describe "#backbone_collection_for" do
it 'returns a script with the backbone collection' do
- categories = Category.all
- result = helper.backbone_collection_for(categories)
- expect(result).to include("csx.Categories")
- expect(result).to include("Backbone.Collection")
+ result = helper.backbone_collection_for(Category.all)
+ expect(result).to include("AutoCollection.install")
+ expect(result).to include("Category")
+ expect(result).to include("categories")
end
it 'escapes namespaces correctly' do
- tags = ActsAsTaggableOn::Tag.all
- result = helper.backbone_collection_for(tags)
- expect(result).to include("csx.Tags")
- expect(result).to include("Backbone.Collection")
+ result = helper.backbone_collection_for(ActsAsTaggableOn::Tag.all)
+ expect(result).to include("AutoCollection.install")
+ expect(result).to include("Tag")
+ expect(result).to include("acts_as_taggable_on_tags")
end
end
end