Skip to content

Instantly share code, notes, and snippets.

@iwinux
Created January 5, 2013 05:32
Show Gist options
  • Save iwinux/4459946 to your computer and use it in GitHub Desktop.
Save iwinux/4459946 to your computer and use it in GitHub Desktop.
A sample Rails form definition
= simple_form_for([:admin, @event]) do |f|
= f.error_notification
.form-inputs
= f.input :is_active
= f.input :name_en, label: 'Name (in English)', input_html: { class: 'input-xxlarge' }
= f.input :name_cn, label: 'Name (in Chinese)', input_html: { class: 'input-xxlarge' }
= f.input :category_id, as: :hidden
= f.input :address_en, as: :text, label: 'Address (in English)', input_html: { class: 'input-xxlarge', rows: 2 }
= f.input :address_cn, as: :text, label: 'Address (in Chinese)', input_html: { class: 'input-xxlarge', rows: 2 }
.form-actions
= f.button :submit, class: "btn btn-primary"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment