When copying text on a Rails application page, it is displayed with spaces instead of paragraphs, and if you enter text from the keyboard, then Enter works like saving text. How to make the application displayed paragraphs?
The form:
<%= form_with(model: act, local: true) do |form| %> <% if act.errors.any? %> <div id="error_explanation"> <h2><%= pluralize(act.errors.count, "error") %> prohibited this act from being saved:</h2> <ul> <% act.errors.full_messages.each do |message| %> <li><%= message %></li> <% end %> </ul> </div> <% end %> <div class="form-group"> <%= form.label :description %> <%= form.text_area :description, id: :act_description, class: "form-control" %> </div> <div class="actions"> <%= form.submit "Create", class: "btn btn-primary" %> </div> <% end %> view:
<h1>Acts:</h1> <%= link_to 'New Act', new_act_path, class: "btn btn-primary btn-sm" %> <br><br> <% @acts.each do |act| %> <% if act.user == current_user %> <div class="alert alert-info"> <article class="lead"> <%= act.description %> <span class="float-right"> <%= link_to 'Edit', edit_act_path(act), class: "btn btn- primary btn-sm" %> <%= link_to 'Destroy', act, method: :delete, data: { confirm: 'Are you sure?' }, class: "btn btn-danger btn-sm" %> </span> </article> </div> <% end %> <% end %> <%= link_to 'New Act', new_act_path, class: "btn btn-primary btn-sm" %>