Leo's Technical Blog
user

Leo's Technical Blog

Mostly about computer programming.


Featured

rants, rails

On Really Disliking Monkeypatching

Posted on .

No, this is not going to be a very well articulated post. I'm just ranting, expecting that I can feel better in a few more minutes and get back to work. I hate monkey-patching. Yeah, yeah, I also use it when there is no other option, but I still hate it while…

Featured

ruby, rails

Loading Rails Fixtures Without Deleting Existing Records

Posted on .

This blog post by choonkeat explain how to overcome the ruby limitation which forbids the use of the "class [name-of-the-class-to-monkeypatch]" statement inside methods. Why would you need this? I just used it to define a db:fixtures:insert task, which differ…

Featured

ruby, rails, asking

Rails Migrations Gotcha: Backward-Incompatible Model Changes

Posted on .

I'm pushing for adoption of Rails Migration on all Rails projects on my job (we use them on a few). As a consequence, I won the assignment of writing migrations for the last changes on the system I'm currently involved. That seemed easy, but it wasn't. I will…

Featured

advising, rails, security

Security by Stupidity I: Rails and attr_accesible

Posted on .

Sometimes you get surprised how frameworks and/or applications messes things up when trying to deal with security. Here is one example. Context Framework: Rails Stupidity: attraccesible/attrprotected Output: Annoyed developers and/or missing data. Explanation…