Remove model/Table name from form errors
Here i am going to use regular expression to remove model/table name from my errors messages
<% @company.errors.full_messages.each do |msg| %>
<%= msg.gsub(/^\w+/, "").strip.capitalize %>
<% end %>
Here i am going to use regular expression to remove model/table name from my errors messages
<% @company.errors.full_messages.each do |msg| %>
<%= msg.gsub(/^\w+/, "").strip.capitalize %>
<% end %>
No comments:
Post a Comment