Created
August 23, 2014 11:45
-
-
Save kawahiro311/7d046a0910f085710dfc to your computer and use it in GitHub Desktop.
RailsでTwitterBootstrapを使ったエラーメッセージ
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
<% if errors.any? %> | |
<div class="alert alert-danger" role="alert"> | |
<ul> | |
<% errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> |
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) do |f| %> | |
<%= render partial: 'shared/errors', object: @user.errors %> | |
... | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment