Why should you document your projects better?

Wojciech Ziniewicz
Stories imported from wordpress
1 min readJun 20, 2013

I had a terrible time lately migrating between paperclip 2 and 3. It turned out that paperclip in version 3.x changes some characters into underline ‘_’ sign.

After digging the documentation I started to some monkey patching and really weird stuf, but SUDDENLY:

[code lang=”ruby”]
@default_options ||= {
[…]
:restricted_characters => /[&$+,\/:;=?@<>\[\]\{\}\|\\\^~%# ]/,
:hash_data => “:class/:attachment/:id/:style/:updated_at”,
:hash_digest => “SHA1”,
[…]
:styles => {},
:url => “/system/:class/:attachment/:id_partition/:style/:filename”,
:url_generator => Paperclip::UrlGenerator,
:use_default_time_zone => true,
:use_timestamp => true,
:whiny => Paperclip.options[:whiny] || Paperclip.options[:whiny_thumbnails]
}
[/code]

There’s an undocumented :restricted_characters tag in “has_attached” options that you can use.

So probably 30 seconds of developer’s work on documentation would save the world before destruction. Yay!

--

--