diff options
author | David Gay <david@davidgay.org> | 2021-05-02 20:56:19 -0400 |
---|---|---|
committer | David Gay <david@davidgay.org> | 2021-05-02 20:56:19 -0400 |
commit | 1d5083ddf7f2b285e63bb8019d38199e862fa1d8 (patch) | |
tree | 6be0357a5e55f78faa94afbe9db025e0703f2f3b /app/views | |
parent | cd04bcc4b4e4f5174d2f042bfcf6b840e6e18fee (diff) |
Login with forced character creation, views, etc
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/characters/new.html.erb | 7 | ||||
-rw-r--r-- | app/views/characters/show.html.erb | 4 |
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> |