Skip to content

Commit

Permalink
Replace CSS references with inline basics (#43597)
Browse files Browse the repository at this point in the history
We no longer add a scaffold.css, so we shouldn't depend on it.
  • Loading branch information
dhh committed Nov 5, 2021
1 parent c3758a7 commit 5257da7
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
@@ -1,6 +1,6 @@
<%%= form_with(model: <%= model_resource_name %>) do |form| %>
<%% if <%= singular_table_name %>.errors.any? %>
<div id="error_explanation">
<div style="color: red">
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %> from being saved:</h2>

<ul>
Expand All @@ -12,26 +12,26 @@
<%% end %>

<% attributes.each do |attribute| -%>
<div class="field">
<div>
<% if attribute.password_digest? -%>
<%%= form.label :password %>
<%%= form.label :password, style: "display: block" %>
<%%= form.password_field :password %>
</div>

<div class="field">
<%%= form.label :password_confirmation %>
<div>
<%%= form.label :password_confirmation, style: "display: block" %>
<%%= form.password_field :password_confirmation %>
<% elsif attribute.attachments? -%>
<%%= form.label :<%= attribute.column_name %> %>
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, multiple: true %>
<% else -%>
<%%= form.label :<%= attribute.column_name %> %>
<%%= form.label :<%= attribute.column_name %>, style: "display: block" %>
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %> %>
<% end -%>
</div>

<% end -%>
<div class="actions">
<div>
<%%= form.submit %>
</div>
<%% end %>
@@ -1,4 +1,4 @@
<p id="notice"><%%= notice %></p>
<p style="color: green"><%%= notice %></p>

<h1><%= human_name.pluralize %></h1>

Expand Down
@@ -1,4 +1,4 @@
<div id="<%%= dom_id <%= singular_table_name %> %>" class="scaffold_record">
<div id="<%%= dom_id <%= singular_table_name %> %>">
<% attributes.reject(&:password_digest?).each do |attribute| -%>
<p>
<strong><%= attribute.human_name %>:</strong>
Expand Down
@@ -1,4 +1,4 @@
<p id="notice"><%%= notice %></p>
<p style="color: green"><%%= notice %></p>

<%%= render @<%= singular_table_name %> %>

Expand Down

0 comments on commit 5257da7

Please sign in to comment.