= simple_nested_form_for ([:orga, conference]) do |f|
  - if conference.errors.any?
    #error_explanation
      h2 = "#{pluralize(conference.errors.count, "error")} prohibited this mailing from being saved:"
      ul
        - conference.errors.full_messages.each do |message|
          li = message

  = f.input :name
  = f.input :url
  = f.input :location
  = f.input :twitter
  = f.input :starts_on, order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :ends_on,   order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :tickets
  = f.input :flights
  = f.input :round
  = f.input :accomodation, label: "Accommodation"
  = f.input :lightningtalkslots, label: "Lightning Talk Slots"

  h3 Attendees
  fieldset.attendees
    .header
      label Github Handle
    = f.simple_fields_for :attendances do |s|
      = s.input :github_handle, required: true, label: false
      = s.link_to_remove 'Remove'
    = f.link_to_add 'Add another attendee', :attendances

  .actions
    = f.submit 'Save', class: 'btn btn-success'

= simple_nested_form_for ([:orga, conference]) do |f|
  - if conference.errors.any?
    #error_explanation
      h2 = "#{pluralize(conference.errors.count, "error")} prohibited this mailing from being saved:"
      ul
        - conference.errors.full_messages.each do |message|
          li = message

  = f.input :name
  = f.input :url
  = f.input :location
  = f.input :twitter
  = f.input :starts_on, order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :ends_on,   order: [:day, :month, :year], input_html: { class: 'short' }
  = f.input :round, collection: 1..2
  = f.input :tickets, default: 0, collection: 0..20
  = f.input :flights, default:0, collection: 0..(conference&.tickets || 20)
  = f.input :accomodation, label: "Accommodation", default:0, collection: 0..(conference&.tickets || 20)
  = f.input :lightningtalkslots, label: "Lightning Talk Slots"

  h3 Attendees
  fieldset.attendees
    .header
      label Github Handle
    = f.simple_fields_for :attendances do |s|
      = s.input :github_handle, required: true, label: false
      = s.link_to_remove 'Remove'
    = f.link_to_add 'Add another attendee', :attendances

  .actions
    = f.submit 'Save', class: 'btn btn-success'

Add ranges to number fields
Add ranges to number fields

TeamCheesy/rgsoc-teams,rails-girls-summer-of-code/rgsoc-teams,michaelem/rgsoc-teams,rails-girls-summer-of-code/rgsoc-teams,TeamCheesy/rgsoc-teams,michaelem/rgsoc-teams,michaelem/rgsoc-teams,rails-girls-summer-of-code/rgsoc-teams,TeamCheesy/rgsoc-teams