Category Archives: programming

Pusher: Presence channels are private channels

Channels prefixed with ‘presence-’ don’t need to be also prefixed with ‘private-’ From the Pusher docs: Presence channels build on the security of Private channels and expose the additional feature of an awareness of who is subscribed to that channel.  So, don’t bother adding the ‘private-’ prefix to a ‘presence-’ prefixed channel because it will [...]

Also posted in developer tools, web programming | Tagged , , , , | Leave a comment

Having a scope called `parents` breaks acts_as_nested_set

I started to get this weird error with my categories today. It was sort of ridiculous because I had only changed my scope name from ‘parent’ to ‘parents’! That was the problem. acts_as_nested_set, v1.4.4, breaks if you name a scope ‘parents.’ You will get an error like this: undefined method `const_defined?’ for #<Category:0x112ccfdb8>

Also posted in open source, Ruby programming, web programming | Tagged , , , | Leave a comment

Censo 2010 API: Qué métodos ofrecer

Quizás lo más difícil de construir una API es definir qué métodos proveer. Estos dependen de los datos que tenemos.

Para el caso de Censo 2010, la información scrapeada del INDEC solo contiene datos de población en el país. (Por lo menos por ahora)

Elegí proveer métodos básicos para consultas sobre población por departamento o provincia.

Also posted in open source, Ruby programming, web programming | Tagged , , , , | Leave a comment