<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1823451338279488333</id><updated>2011-07-08T03:27:06.610+02:00</updated><category term='ruby'/><category term='WebApp'/><category term='iPhone'/><category term='Apple'/><category term='rails ActiveRecord'/><category term='EverNote'/><title type='text'>niqnic</title><subtitle type='html'>N'importe quoi, n'importe comment</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://niqnic.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://niqnic.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Rollo</name><uri>http://www.blogger.com/profile/05009292413751031918</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1823451338279488333.post-1975312283306574901</id><published>2009-10-11T21:07:00.005+02:00</published><updated>2009-10-11T21:12:02.608+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ruby'/><title type='text'>Ruby: 1.8.x hashes are not sorted</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:Corbel;font-size:medium;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#800000;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size:100%;"&gt;What?&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;I know, it stinks. But Ruby 1.9.x has sorted Hashes (in insertion oreder)&lt;/div&gt;&lt;div&gt;&lt;span style="font-family:monospace;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span&gt;&lt;span class="Apple-style-span"  style="font-family:'courier new';"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;# Ruby 1.8.7irb(main):001:0&gt; {:a=&gt;"a", :c=&gt;"c", :b=&gt;"b"}=&gt; {:a=&gt;"a", :b=&gt;"b", :c=&gt;"c"}# Ruby 1.9.1 (in insertion order)irb(main):001:0&gt; {:a=&gt;"a", :c=&gt;"c", :b=&gt;"b"}=&gt; {:a=&gt;"a", :c=&gt;"c", :b=&gt;"b"}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;More info here: &lt;span style="font-family:monospace;"&gt;http://www.igvita.com/2009/02/04/ruby-19-internals-ordered-hash/&lt;/span&gt;&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="text-decoration: underline;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;u&gt;&lt;span style="font-size:100%;"&gt;Wait. I can't migrate over to Ruby 1.9.x. So what?&lt;/span&gt;&lt;/u&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;There are a lot of reasons why you wouldn't migrate, one of which being that after 2 years, Komodo IDE is still unable to debug 1.9 code.&lt;/div&gt;&lt;div&gt;Anyway. There's a trick to have sorted hashes in Ruby 1.8. Just maintain a sorted array of keys, and then each time you want to traverse your hash, do so via the parallel array.&lt;/div&gt;&lt;div&gt;See an example of this technique in my YADL module which I built in order to parse DOS variables. It will be the subject of my next post.&lt;/div&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1823451338279488333-1975312283306574901?l=niqnic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niqnic.blogspot.com/feeds/1975312283306574901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1823451338279488333&amp;postID=1975312283306574901' title='42 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/1975312283306574901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/1975312283306574901'/><link rel='alternate' type='text/html' href='http://niqnic.blogspot.com/2009/10/ruby-1.html' title='Ruby: 1.8.x hashes are not sorted'/><author><name>Rollo</name><uri>http://www.blogger.com/profile/05009292413751031918</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>42</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1823451338279488333.post-4268753137390382622</id><published>2009-07-26T16:55:00.004+02:00</published><updated>2009-07-26T17:09:49.569+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Apple'/><title type='text'>Build Best Products: The Perfect Marketing Mix?</title><content type='html'>So it's been more than a year ow that I've switched.&lt;div&gt;After more than a decade spent with Windows-only desktops and laptops, I gave a Mac a try last year - and never came back.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I'm in the development business. I make a living off my IT skills. So that's fine if my clients are struggling to keep their Windows environment efficient because that's why I'm there.&lt;/div&gt;&lt;div&gt;But for my personal needs, why should I struggle the same?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's been over a year. And mind you, this has strange collateral effects. Because I could never really set up on a correct Windows machine, I was used to reinstall the OS and all dev software every 6 months. And within a year, I'd buy a new one.&lt;/div&gt;&lt;div&gt;What a shock I had recently, when I realized that I haven't been in the market for a new laptop since I bought my MacBook eighteen months ago!&lt;/div&gt;&lt;div&gt;And if I were, I guess I would be looking for a newer MacBook - mind you, not more efficient. So that's probably why I'm not looking for another one.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;From a marketing standpoint, that's terrific. Because it means that the current clients from Apple are faithful on the one hand. On the other, growing means finding new clients because existing ones won't re-equip soon. That my friends is the perfect mix for continued growth. A quick look at the latest stats over Apple latest quarterly results seems to prove the point.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Go buy a Mac, and save money&lt;/b&gt;. That's completely contradictory to what the Microsoft ads are trying to demonstrate. The day they understand that the Apple Tax is actually an Apple Saving, they'll start building their own devices.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1823451338279488333-4268753137390382622?l=niqnic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niqnic.blogspot.com/feeds/4268753137390382622/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1823451338279488333&amp;postID=4268753137390382622' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/4268753137390382622'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/4268753137390382622'/><link rel='alternate' type='text/html' href='http://niqnic.blogspot.com/2009/07/build-best-products-perfect-marketing.html' title='Build Best Products: The Perfect Marketing Mix?'/><author><name>Rollo</name><uri>http://www.blogger.com/profile/05009292413751031918</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1823451338279488333.post-7708006566427143524</id><published>2009-07-12T12:09:00.011+02:00</published><updated>2009-08-23T19:13:03.857+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='EverNote'/><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='WebApp'/><title type='text'>EverNote 3 Series - So What?</title><content type='html'>&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Introduction - What EverNote 3 is all about&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Since it came out last year, &lt;/span&gt;&lt;a href="http://evernote.com/"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;EverNote 3&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; has successfully redefined what note taking applications should be. Now, we all expect them to:&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Offer document access from everywhere: Web browser (IE, FF, Safari), Mobile Phones (WAP), Smartphones (with dedicated applications like the ones for the Apple iPhone or Microsoft's Windows Mobile), Desktops (MacOS and Windows).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Seamlessly integrate with modern communication tools like taking photographs and uploading them.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Offer rich document editing capabilities.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Have built-in search capabilities, including in images.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Support tagging.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Support file attachments.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Offer controlled document sharing (a very recent addition).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- All of this for free (well, most of the features are free but the full monty will set you back 45$ a year and add bigger storage capabilities and SSL).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Having defined the above incredibly rich features set, they have defined their own market and they are way beyond the followers pack. It is very difficult to compete with them I guess. I think today they have more than a million subscribers (not saying all of them are paying customers of course, but I guess their VC funding helps here as well).&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Short History&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;What you might not know is that EverNote is no recent company. And their flagship product is no recent either. At some point in time, there was an EverNote 1.0, then 1.1, then 2.0, etc... At that time, it was a rich Windows application only. And they had a small, but fervent customer base. These versions are no longer available.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;At that time, I felt that the company was having a hard time delivering on promises (like having smartphone client applications or a better note editor) while enlarging the customer base which, as everyone knows, is the only way for a company to keep growing. It just looked like a niche player with no real future actually.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;So they changed of direction and probably, the power went from some hands to some others and as I hinted above, external money helped define a new strategy. &lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;But, from what I can read here and there, most of their ancient customers are a bit lost with the change of direction the company took. It looks like most advanced features have been dropped, and no one in the company is listening to them.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;So what is actually missing then?&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Quite a lot actually (remember though that this is *my* opinion):&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Still no decent unified note editor. The web version vs the Mac version vs the Windows version, etc... Not any one of them is good actually, or consistent with the others. The worst is probably on the Mac where you have (for example) to select the wrong font to have the right one applied. OMG.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Inter-notes linking. This is probably the most required feature they miss. Without it, no wiki-style notes linking. Without it, you are completely unable to link your notes together. Boy, that's a huge hole.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- iPhone version has bells &amp;amp; whistles. But it doesn't have editing capabilities! It can only edit 'text' notes. But real text that is, meaning not even a color or bold or ... nothing. Plain ascii. Wow.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;- Tags organization is missing one huge feature: hierarchy. They had that in their previous version. Imagine you select a tag: the UI then lists all the documents tagged by it. Say for example "Project A". You have all documents tagged "Project A" listed. Okay, but these documents have other tags as well. For example, you can have some tags for your colleagues on these meeting minutes notes. So inside "Project A", you also have "Meeting Minutes" and "Larry" and "Cathy". That's a whole new way of having your notes organized and once you start digging into that, you understand it's quite powerful.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Other Issues&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I know a lot of people prefer having their laptop with them - they don't trust anyone for storing their documents over the Internet (and maybe for good reasons as we saw recently some big players having server problems). And then, once you are with your laptop, you have all the power you need for editing or organizing your work.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I also know some corporate clients of mine are blocking access to Web Applications like Google Docs and EverNote. They mind about the security of their documents and knowledge and IP and honestly they can't be blamed for that. Maybe EverNote is considering something to address these concerns (if not, then that's a missed opportunity) but not as of now anyway.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style=" font-weight: bold; "&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Conclusion?&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;If you are looking for easy (real easy) and efficient (real efficient) internet-based document sharing and ubiquitous access, then look no further. EverNote 3 is what you're looking for.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;But beware the limitations and liabilities.&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Update as at 8.23&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Evernote have recently released a new version of the Mac client, which almost brings it on par to the Windows one. Which means that most painful text editing / formating issues are gone. At last!&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1823451338279488333-7708006566427143524?l=niqnic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niqnic.blogspot.com/feeds/7708006566427143524/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1823451338279488333&amp;postID=7708006566427143524' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/7708006566427143524'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/7708006566427143524'/><link rel='alternate' type='text/html' href='http://niqnic.blogspot.com/2009/07/evernote-3-series-so-what.html' title='EverNote 3 Series - So What?'/><author><name>Rollo</name><uri>http://www.blogger.com/profile/05009292413751031918</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1823451338279488333.post-4789623355807597185</id><published>2009-06-27T16:24:00.011+02:00</published><updated>2009-06-27T18:19:22.006+02:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rails ActiveRecord'/><title type='text'>Rails - How to set defaults to an ActiveRecord model's attributes?</title><content type='html'>&lt;span class="Apple-style-span"   style="  ;font-family:Corbel;font-size:medium;"&gt;&lt;span style="font-family:Helvetica;color:#000080;"&gt;&lt;u&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Problem to Solve&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I want to have a default value for some attributes of an ActiveRecord Model. Of course, I can have the dafault value set in the table itself - but that doesn't cover instance creation (it will only be done after save), plus I cannot have a different default value per say, language and, mostly, it doesn't work for hashes.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;color:#000080;"&gt;&lt;u&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;First Hit&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Obie Fernandez has some proposal &lt;/span&gt;&lt;a href="http://www.jroller.com/obie/entry/default_values_for_activerecord_attributes"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;here&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;, which involves intercepting the attribute getter / setter on the fly, like so:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;class Specification &lt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  def tolerance&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    read_attribute(:tolerance) or 'n/a'&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;class SillyFortuneCookie &lt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  def message=(txt)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    write_attribute(:message, txt + ' in bed') &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;A shorter version would be like so:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;class Specification &lt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  def tolerance&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    self[:tolerance] or 'n/a'&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;class SillyFortuneCookie &lt;&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  def message=(txt)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    self[:message] =  txt + ' in bed' &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;But of course, this doesn't work for hashes.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;color:#000080;"&gt;&lt;u&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Second Thought&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Actually, what would be best is to override the default constructor, to set the hash to some empty value rather than nil.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;See this post on 3HV. Here's the skinny:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;def initialize (params = nil) &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  super(params) &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;  self.myhash = {} unless self.myhash &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;And actually, this is a very bad thing to do. Never override initialize, because of the way AR::Base deals with it. Here's an extract of a post from Josh Susser about the &lt;/span&gt;&lt;a href="http://blog.hasmanythrough.com/2007/1/22/using-faux-accessors-to-initialize-values"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;issue&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt; (very informative, I reckon):&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;i&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;I probably should have been more clear about the problems with overriding initialize, but I figured people already knew not to do that. You can get away with it sometimes, but it's risky and won't always do what you expect. For one thing, your approach won't work right if you also use the block syntax for initialized model object, as the code in your subclass initialize method won't have been run yet when the block is executed. I've definitely run into other issues as well, but it's too early in the morning for me to remember all the details (not a coffee achiever).&lt;/span&gt;&lt;/i&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;color:#000080;"&gt;&lt;u&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Third Thought: using callbaks&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;There is one callback called after_initialize, and this is the method recommended by some Rails luminaries like Michael Koziarski. Here's what you do:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;after_initialize :set_sensible_defaults&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;private&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    def set_sensible_defaults&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        # do stuff&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;But this callback is called only when the object is instanciated from the database (meaning, it's a rough duplicate of after_find callback). And it's a bit late to set defaults.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;So no, there's no callback that matches what we need (like after_new). And some debate has been going on for years about that (extract: &lt;/span&gt;&lt;a href="http://groups.google.com/group/rubyonrails-core/browse_thread/thread/b509a2fe2b62ac5"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;http://groups.google.com/group/rubyonrails-core/browse_thread/thread/b509a2fe2b62ac5&lt;/span&gt;&lt;/a&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;)&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;color:#000080;"&gt;&lt;u&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Fourth Option: Override after_initialize, with a Cost, and a Protection&lt;/span&gt;&lt;/b&gt;&lt;/u&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Here you go:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;def after_initialize&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    if new_record?&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        #do stuff&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;This one will get called in 2 cases: when the object is first instanciated in memory (which is what we're looking for), and also when the object is later retrieved from the database, which is why we protect ourselves using new_record?&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-family:Helvetica, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;The problem here is: the method will be called in the above 2 cases, meaning each time an object is retrieved from the DB, although you don't need that. Small problem arguably.&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;Now, after_initialize is called AFTER the object has been created in memory and AFTER attributes have been set potentially (as would result from a call like Object.new(:attr1=&gt;"value1")&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel, -webkit-fantasy;"&gt;&lt;span class="Apple-style-span"  style="font-family:Corbel;"&gt;&lt;span style="font-family:Helvetica;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;So, here's what you should really do:&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;def after_initialize&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    if new_record?&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        # Set default only if the attribute is not set already&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;        self.attr1 = "Default value" if self.attr1.nil?&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;    end&lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:Courier;color:#570F0B;"&gt;&lt;span class="Apple-style-span"  style="font-size:small;"&gt;end&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1823451338279488333-4789623355807597185?l=niqnic.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://niqnic.blogspot.com/feeds/4789623355807597185/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=1823451338279488333&amp;postID=4789623355807597185' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/4789623355807597185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1823451338279488333/posts/default/4789623355807597185'/><link rel='alternate' type='text/html' href='http://niqnic.blogspot.com/2009/06/rails-how-to-set-defaults-to-objects.html' title='Rails - How to set defaults to an ActiveRecord model&apos;s attributes?'/><author><name>Rollo</name><uri>http://www.blogger.com/profile/05009292413751031918</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry></feed>
