summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
Diffstat (limited to 'app/views')
-rw-r--r--app/views/characters/new.html.erb7
-rw-r--r--app/views/characters/show.html.erb4
2 files changed, 11 insertions, 0 deletions
diff --git a/app/views/characters/new.html.erb b/app/views/characters/new.html.erb
new file mode 100644
index 0000000..451d731
--- /dev/null
+++ b/app/views/characters/new.html.erb
@@ -0,0 +1,7 @@
+<h1 class="text-xl">New Character</h1>
+
+<%= form_with model: @character do |f| %>
+ <%= f.label :name, "Name" %>
+ <%= f.text_field :name %>
+ <%= f.submit "Create" %>
+<% end %>
diff --git a/app/views/characters/show.html.erb b/app/views/characters/show.html.erb
new file mode 100644
index 0000000..8a3b08b
--- /dev/null
+++ b/app/views/characters/show.html.erb
@@ -0,0 +1,4 @@
+<h1 class="text-xl">
+ <%= @character.name %>
+</h1>
+<p>First entered the planes <%= pluralize((Date.current - @character.created_at.to_date).to_i, "day") %> ago.</p>