Created
June 10, 2012 16:58
-
-
Save stijlist/2906611 to your computer and use it in GitHub Desktop.
Trying to add CSS classes to form_for
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
= form_for (@user, :html => {:class => "well"}) do |f| | |
-if @user.errors.any? | |
#error_explanation | |
%h2= "#{pluralize(@user.errors.count, "error")} prohibited this user from being saved:" | |
%ul | |
- @user.errors.full_messages.each do |msg| | |
%li= msg | |
.field | |
= f.label :fname | |
= f.text_field :fname | |
.field | |
= f.label :lname | |
= f.text_field :lname | |
.field | |
= f.label :email | |
= f.text_field :email | |
.field | |
= f.label :password | |
= f.text_field :password | |
.actions | |
= f.submit 'Save' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment