users_controller.rb
if Rails.env.production?
#The definition of the production environment
end
users_controller.rb
if Rails.env.development?
#Definition of development environment
end
erb:index.html.erb
<% if Rails.env.production? %>
<%#It is a display of the production environment%>
<% end %>
erb:index.html.erb
<% 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!