Ruby on Rails
rails
Articles on Ruby on Rails
-
Association Callbacks
Similar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get trigged when you add an object to or remove an object from a association collection.
Read more about the callbacks `before_add`, `after_add`, `before_remove` and `after_remove`
-
Deploy Rails with Oracle on Windows
Rails with Oracle on Windows Server. Load balanced with Mongrel and Pen.
-
RailsConf 2007
Ok, I've just got back from RailsConf 2007. It was awesome to be amongst so many bright motivated people. The talks gave a broad overview on what was happening in the ruby community and the workshops explored specific topics in more technical depth.
-
Improve Default Rails Database Performance
Active Record (AR) is slow. All that nice reflection comes at a price. You should use AR to prototype your app, then take a look at the logs to see where SQL can be tweaked.
-
Named Callbacks
Coming from a Java background I often find myself wanting to override constructors and other hooks. Using named callbacks better conveys your intention, making your code more readable.
-
Active Record Constructors
Do not write your own initialiser to instantiate the object.
-
Selection List syntax
I don't think the explanation of 'selection lists' in Agile Web Development with Rails(1st ed) is very clear.
-
Session variable not available
You CANNOT access the session hash from within a controllers
initialize()method. -
Rails Fixtures with Legacy Database
The fixture file has to be TABLENAME.yml (not case sensitive)