From 28426519e11e72576b1a3339f47c420f9c184e49 Mon Sep 17 00:00:00 2001 From: David Gay Date: Mon, 5 Jul 2021 20:30:15 -0400 Subject: Give characters a location, and replace the Locations view+controller with a Look view+controller --- app/views/locations/index.html.erb | 8 -------- app/views/locations/show.html.erb | 25 ------------------------- 2 files changed, 33 deletions(-) delete mode 100644 app/views/locations/index.html.erb delete mode 100644 app/views/locations/show.html.erb (limited to 'app/views/locations') diff --git a/app/views/locations/index.html.erb b/app/views/locations/index.html.erb deleted file mode 100644 index 3c9b837..0000000 --- a/app/views/locations/index.html.erb +++ /dev/null @@ -1,8 +0,0 @@ -

Locations

- -<% @locations.each do |location| %> -
-

<%= link_to location.name, location_path(location) %>

-

<%= location.description %>

-
-<% end %> diff --git a/app/views/locations/show.html.erb b/app/views/locations/show.html.erb deleted file mode 100644 index 2f1074a..0000000 --- a/app/views/locations/show.html.erb +++ /dev/null @@ -1,25 +0,0 @@ -
-

<%= @location.name %>

-

<%= @location.description %>

-
- -<% @location.monster_spawns.select(&:alive?).each do |ms| %> -

A <%= ms.monster.name %> is ravaging this location! (<%= ms.remaining_hp %> HP)

- <%# TODO: HACK %> - <% activity = Activity.find_by_gid("beastslay_leviathan_floret") %> - <%= form_with url: start_activity_path(activity) do |f| %> - <%= f.hidden_field :id, value: activity.id %> - <%= f.submit "Hunt" %> - <% end %> -<% end %> - -<% @location.activities.order(:name).each do |activity| %> -
-

<%= link_to activity.name, activity_path(activity) %>

-

<%= activity.description %>

- <%= form_with url: start_activity_path(activity) do |f| %> - <%= f.hidden_field :id, value: activity.id %> - <%= f.submit "Start" %> - <% end %> -
-<% end %> -- cgit v1.2.3