Skip to content

Commit

Permalink
Included message feature in the template generation
Browse files Browse the repository at this point in the history
  • Loading branch information
ashrafuzzaman committed Jun 24, 2012
1 parent e9bd571 commit 60e354f
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 67 deletions.
9 changes: 0 additions & 9 deletions lib/generators/messages/USAGE

This file was deleted.

16 changes: 0 additions & 16 deletions lib/generators/messages/messages_generator.rb

This file was deleted.

9 changes: 0 additions & 9 deletions lib/generators/messages/templates/erb/_errors.html.erb

This file was deleted.

21 changes: 0 additions & 21 deletions lib/generators/messages/templates/erb/_notifications.html.erb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
<%%= form_for(@<%= singular_table_name %>, html: {class: 'form-horizontal well'}) do |f| %>
<%% if @<%= singular_table_name %>.errors.any? %>
<div id="error_explanation">
<h2><%%= pluralize(@<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>

<ul>
<%% @<%= singular_table_name %>.errors.full_messages.each do |msg| %>
<li><%%= msg %></li>
<%% end %>
</ul>
</div>
<%% end %>

<%%= render :partial => 'shared/notifications', :locals => {:model => @<%= singular_table_name %>} %>
<fieldset>
<legend><%%= <%= singular_table_name %>_form_title(@<%= singular_table_name %>) %></legend>
<% attributes.each do |attribute| -%>
Expand Down

0 comments on commit 60e354f

Please sign in to comment.