= field_wrapper_for(form, field) do
  = form.send field.view_helper, field.method_name, field.html_attributes

- if field.ckeditor
  - head_javascript "ckeditor/ckeditor.js"
  - head_javascript do
    - if !File.exists?(File.join(Rails.root, 'public/javascripts/ckeditor/ckeditor.js'))
      alert("Install CKEditor using rake admin:ckeditor_download");
    $j(document).ready(function($){
    CKEDITOR.replace('#{field.dom_id}',
    {
    customConfig : '#{field.ckeditor_config_js}'
    }
    );
    });

= field_wrapper_for(form, field) do
  = form.send field.view_helper, field.method_name, field.html_attributes

- if field.ckeditor
  - head_javascript "ckeditor/ckeditor.js"
  - head_javascript do
    - if !File.exists?(File.join(Rails.root, 'public/javascripts/ckeditor/ckeditor.js'))
      alert("Install CKEditor using rake admin:ckeditor_download");
    $j(document).ready(function($){
    CKEDITOR.replace('#{field.dom_id}',
    {
    customConfig : '#{field.ckeditor_config_js.html_safe}'
    }
    );
    });

Make the config.js file path not escaped and actually loaded
Make the config.js file path not escaped and actually loaded 