Permalink
Browse files

Titling the model name in views generated by scaffold.

eg. rails g scaffold UserProfile will have in index.html.erb "Listing User Profiles"
rather than Listing user_profiles.
  • Loading branch information...
1 parent dccf6da commit de7c61b072e8bde291b921f5745d301fb2a5d310 @amitsuryavanshi amitsuryavanshi committed Jun 18, 2014
@@ -1,4 +1,4 @@
-<h1>Editing <%= singular_table_name %></h1>
+<h1>Editing <%= singular_table_name.titleize %></h1>
<%%= render 'form' %>
@@ -1,4 +1,4 @@
-<h1>Listing <%= plural_table_name %></h1>
+<h1>Listing <%= plural_table_name.titleize %></h1>
<table>
<thead>
@@ -1,4 +1,4 @@
-<h1>New <%= singular_table_name %></h1>
+<h1>New <%= singular_table_name.titleize %></h1>
<%%= render 'form' %>

0 comments on commit de7c61b

Please sign in to comment.