How did I overcome TDD fear

I was using Rails for over two years, but I still was not truly converted to TDD. There was no special reason for it, I have tried few times with my own projects to take TDD approach. And I was quickly returning to plain, old code crunching. Why? Maybe I haven’t approached TDD with enough …

Simple search in Rails applications

Almost every application does need search feature. Even if not direct feature You need some efficient way to narrow data selection. And I do like to have clean and compact code :) so I have spent some time to create my own search schema which I’d like to share with You. First – what I’m …

Rake and arguments for tasks

Rake is beautiful tool, helping automate many tasks using Ruby. When You want to pass some arguments You can add VAR=value on command line and then in task use ENV[‘VAR’] to access passed value. But it is not what You alway want. Sometimes You want more compact and clean way to pass arguments. Starting with …

MySQL collate setting in Rails application

I do love MySQLs collate options. There are so many of them. One for server, one for database and one for client connection. There is one missing – One to rule them all ;)) I don’t know if it is FreeBSD specific (no it is not – I have checked only Linux box I got …

Session store – don’t get trapped

I’ve recently stumbled upon some design flaw in Rails applications. It looks like it is much more popular than I thought… Session hash can store whole objects. Don’t do that. I’ve recently seen applications storing whole ActiveRecord objects in session. Why it is dumb idea? First – with new Rails default storage for session are …