Skip to content

Instantly share code, notes, and snippets.

@raderj89
Created March 4, 2014 19:44
Show Gist options
  • Save raderj89/9354083 to your computer and use it in GitHub Desktop.
Save raderj89/9354083 to your computer and use it in GitHub Desktop.
%h2 New Project
= form_for(@project) do |f|
%div{ id: "error_explanation" }
- if @project.errors.any?
%h2= pluralize(@project.errors.count, "error")
Prohibited this project from being saved:
%ul
- @project.errors.full_messages.each do |msg|
%li= msg
%p
= f.label :name
%br
= f.text_field :name
%p
= f.label :description
%br
= f.text_field :description
= f.submit
@beaugaines
Copy link

Is indentation accurate here? Your labels and inputs should be on the same level. If that don't help maybe wrap the label/inputs in fieldsets or divs? Not sure, never experienced this problem myself...

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