Today I finally finished the rails 3.1 upgrade for our open source CMS Alchemy.
An issue I ran into was, that while deploying, the assets from inside the engine weren’t precompiled.
Mehr lesen
I like Safaris style of focused form elements.
For those not using Safari (why?) it looks like this:

But I also love cross browser styling of form elements like buttons, inputs, selects.
So I simulated the style with CSS3!
Today I made a HTML5 Form with the new cool placeholder feature.
The placeholder feature lets you set a placeholder text for an form input element.
<input type="text" placeholder="Your name" name="name">
See more here
But like often in this shiny new HTML5 world the browser support for HTML5 is limited.
So I wrote a jQuery based Javascript fallback for browsers not supporting this feature.
Ever ask how to merge folders and it’s contents under Mac OS X like Windows does?
This Guide is for installing subversion on a debian (lenny) linux server with mod_dav and mod_dav_svn for the apache2 webserver. You must have root access to your server to follow this guide.
Rails 3.1 action caching and render layout false
Today I ran into one of the weirdest issues I ever ran into the past 6 years.
In Alchemy CMS we use rails action caching to cache the content of pages. This worked fine for rails 2.x. But now we finally made the switch to rails 3.1 we had an weird issue with action caching.
Although we passed :layout => false to caches_action the whole layout was always cached together with the action. After nearly 5 hours of debugging and swearing I found the solution.
In the show action (the action we are caching, obviously) we call
(layout_for_page returns either application.html.erb if present, or alchemy/pages.html.erb if not).
After removing this everything worked fine. But how do we ensure our feature is still working?
I use the layout class method and pass the method name as symbol:
Rails evaluates this method and uses the return value as layout.