ActiveRecord Associative Array Directly Into The Database
The other day, I came across the following code in a Rails project of mine:
value = SystemSetting[:some_key_here].to_i
Hmm, I could not recoqnize SystemSetting, so I guessed it was something a colleague of mine had introduced while I was away from the project. I guessed it to be an associative array, setup in the rails environment files, [...]
February 13, 2008
Tags: ActiveRecord, rails, ruby Posted in: Programming
3 Comments
One ActiveRecord Naming Convention To Take With Me
You can say what you want about the way ActiveRecord pluralizes table names. I for one, do not like it much! But hey, I could get used to it, so what the heck. But one naming convention I noticed that I have taken with me back into Java land, is the one about naming properties [...]
January 10, 2008
Tags: ActiveRecord, Java, rails Posted in: Programming
No Comments
