From 1d5083ddf7f2b285e63bb8019d38199e862fa1d8 Mon Sep 17 00:00:00 2001 From: David Gay Date: Sun, 2 May 2021 20:56:19 -0400 Subject: Login with forced character creation, views, etc --- app/views/characters/new.html.erb | 7 +++++++ app/views/characters/show.html.erb | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 app/views/characters/new.html.erb create mode 100644 app/views/characters/show.html.erb (limited to 'app/views') 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 @@ +

New Character

+ +<%= 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 @@ +

+ <%= @character.name %> +

+

First entered the planes <%= pluralize((Date.current - @character.created_at.to_date).to_i, "day") %> ago.

-- cgit v1.2.3