Don’t Byte Me
If you’re looking at your code and realizing “I need this number in bytes, not MB so I can use Rails’s handy number_to_human_size helper”, don’t forget that the Numeric class is there to help!
5.megabytes => 5242880 == 5*1024*1024
number_to_human_size(5.megabytes) => “5 MB” == YAHTZEE!
find_by_name where name = 0
In Rails, User.find_by_name(“myName”) will run sql like “SELECT users.* from users where users.name = ‘myName’”
We have found that it is occasionally producing “SELECT users.* from users where users.name = 0″.
This is invalid and will give a database error. Help!
Rails hacked (again)
The 3.0.x and 2.3.x lines are affected. It’s a mega security flaw in JSON parsing. Upgrade your old apps now. 3.1.x and 3.2.x lines unaffected. Read more here: https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/1h2DR63ViGo
Tuesday: Xtreme Tuesday
Talk about Software Development and Agile.