Thanks to some great help on SO, I managed to get a WYSIWYG editor with Paperclip integration working for my app: http://stackoverflow.com/questions/2277348/wysiwyg-image-uploads-in-rails-app
I'm seeing some interesting behaviour where my WYSIWYG editor disappears if there is a validation error.
The editor includes are defined in application.html.haml and look like this:
= javascript_include_tiny_mce_if_used
= tiny_mce if using_tiny_mce?
The editor itself is called by assigning my textarea (which is called Description) a class of this:
= f.text_area :description, :class => "mceEditor"
All this works fine. When a validation error happens however, the WYSIWYG editor disappears... I've done some investigating with Firebug and found that the "error page" doesn't have the TinyMCE includes in it's HEAD.
I thought that all my views would inherit from application.html... Is this not the case for error pages? How do I ensure the includes are correctly processed even under error conditions?