nonstic Random snippets of mac and rails goodness

Posts from December 2008

Chaining Javascript OnLoad Event Handlers (or How to Use the YM4R Plug-in and FancyZoom together in a Rails App)

I was building a Rails application today, and wanted to include Google Maps integration and use the FancyZoom Javascript library on the same page. These two javascript libraries both depend on being instantiated as part of the onload Event Handler. Normally, you load FancyZoom in the body tag thusly: <body onload=”setupZoom();”> However, if you have [...]

Fixing RedCloth (undefined method `textilize') Errors on Shared Hosts

Symptom: You’ve developed a Rails app utilizing the RedCloth “textilize” method to apply the textile filter to to text field. eg. <%= textilize @post.body %> You may have the “RedCloth” gem installed, or unpacked to /vendor. This app works fine on your local Mac workstation. When you try to run your app in Production mode [...]