Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Censo2010 Backbone Rewrite
window.Censo2010 = {};
$(function(){
Censo2010.CabecerasCollection = Backbone.Collection.extend({
model: Censo2010.Cabecera,
url: function() {
return 'http://censo2010.heroku.com/cabeceras';
}
});
});
$(function(){
Censo2010.Cabecera = Backbone.Model.extend({
});
});
Censo2010.Cabeceras = new CabecerasCollection;
Censo2010.Cabeceras.fetch({success: function() {alert('bazinga');} })
@lucasefe

window.Censo2010 = {}

$ ->
window.Censo2010.BASE = 'http://localhost:9292/'
# window.BASE = 'http://censo2010.heroku.com/'

window.Censo2010.Provincia = Backbone.Model.extend {
}

window.Censo2010.ProvinciaCollection = Backbone.Collection.extend {
url: ->
Censo2010.BASE + 'provincias'
}

window.Censo2010.Provincias = new Censo2010.ProvinciaCollection

Censo2010.Provincias.fetch {
success: -> alert 'bazinga'
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.