if Rails.env.production? #The definition of the production environment end
if Rails.env.development? #Definition of development environment end
<% if Rails.env.production? %> <%#It is a display of the production environment%> <% end %>
<% if Rails.env.development? %> <%#It is a display of the production environment%> <% end %>
"There is a gap between the development environment and the production environment ..." "I have no choice but to match it to the production environment, but it's inconvenient in the development environment ..."
We have introduced conditional branching that can be used in such cases. The production environment is difficult! Let's do our best to learn Rails!