Skip to content

Instantly share code, notes, and snippets.

@paulogeyer
Forked from andrellima/gist:622271
Created October 12, 2010 14:49
Show Gist options
  • Save paulogeyer/622292 to your computer and use it in GitHub Desktop.
Save paulogeyer/622292 to your computer and use it in GitHub Desktop.
-javascript 'post'
= simple_form_for(@post) do |f|
= render 'shared/error_messages', :target => @post
.inputs
= f.input :title
= f.input :sequence
= f.input :description, :input_html => {:rows =>5}
= f.simple_fields_for :sections do |section_f|
.section
%h2 Section
= section_f.input :heading
= section_f.input :body, :input_html => {:rows =>5}
= section_f.input :position
= f.button :submit
= section_f.simple_fields_for :snippet do |snippet_f|
.snippet
%h3 Snippet
= snippet_f.input :caption
= snippet_f.input :content, :input_html => {:rows =>5}
= snippet_f.input :language, :as => :select, :collection => coderay_languages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment