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 %>
this will only migrate tables structure from development to production
RAILS_ENV=production rake db:migrate
Most of time i need to look at my routes and as project increases so the list of routes and it's get confusing to find a specific routes using rake routes command so here is the answer
rake routes CONTROLLER=controller_name
For Example
rake routes CONTROLLER=posts