Skip to content

Instantly share code, notes, and snippets.

@ramontayag
Created October 6, 2010 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ramontayag/613780 to your computer and use it in GitHub Desktop.
Save ramontayag/613780 to your computer and use it in GitHub Desktop.
# HAML view
= f.text_area :javascript, :description => "Javascript typed here will come out in this page's javascript's section.", :rows => 20, :cols => 50, 'data-bespinoptions' => %q({ "syntax": "js" }).html_safe
# Output
<textarea cols="50" data-bespinoptions="{ &quot;syntax&quot;: &quot;js&quot; }" description="Javascript typed here will come out in this page's javascript's section." id="page_javascript" name="page[javascript]" rows="20"></textarea>
@ramontayag
Copy link
Author

Oh, and yes, in case you know bespin, I know that { "syntax": "js" } is incomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment