From b1173d2f3176610d7fff33c37a2e94e841d23e18 Mon Sep 17 00:00:00 2001 From: Arush Chhatrapati Date: Sat, 17 Feb 2024 17:30:54 -0800 Subject: [PATCH] added to field to view and added a file I forgot to add from prev migration --- app/models/email_template.rb | 1 + app/views/email_templates/_form.html.erb | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/email_template.rb b/app/models/email_template.rb index a8042c03..b94f0df0 100644 --- a/app/models/email_template.rb +++ b/app/models/email_template.rb @@ -14,6 +14,7 @@ # required :boolean default(FALSE) # subject :string # title :string +# to :string # created_at :datetime not null # updated_at :datetime not null # diff --git a/app/views/email_templates/_form.html.erb b/app/views/email_templates/_form.html.erb index 5a7a6e12..ce6df5f3 100644 --- a/app/views/email_templates/_form.html.erb +++ b/app/views/email_templates/_form.html.erb @@ -1,7 +1,10 @@ +<%# This part of the page is the email template form %> <%= form_with(model: email_template, local: true) do |form| %>
<%= form.text_field :title, class: "form-control", readonly: email_template.required? %> + + <%= form.text_field :to, class: "form-control" %> <%= form.text_field :subject, class: "form-control" %> @@ -12,7 +15,7 @@ <%= form.submit "Submit", class: "btn btn-primary" %>
<% end %> - +<%# This renders the section on "Allowed Tags" %> <%= render 'liquid_fields' %>