summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorDavid Gay <david@davidgay.org>2021-05-19 21:16:15 -0400
committerDavid Gay <david@davidgay.org>2021-05-19 21:16:15 -0400
commit5afdcd12f04102b5cf5d5a310981bc576a992119 (patch)
tree2f8a8768856268cf755a6c4eb82f768f8c02affc /app/controllers
parente941a28056142ee239bbba623f03537aab0ae039 (diff)
Implement crafting from the hearth forge
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/activities_controller.rb2
-rw-r--r--app/controllers/characters/hearth_controller.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/activities_controller.rb b/app/controllers/activities_controller.rb
index f72bc3a..934f617 100644
--- a/app/controllers/activities_controller.rb
+++ b/app/controllers/activities_controller.rb
@@ -7,7 +7,7 @@ class ActivitiesController < ApplicationController
@activity = Activity.find(params[:id])
if current_char.can_do_activity?(@activity)
current_char.start_activity(@activity)
- redirect_to action: :show
+ redirect_to activity_path(@activity)
else
flash[:alert] = "You can't do that. Make sure you have the items and meet the requirements."
redirect_to character_path(current_char)
diff --git a/app/controllers/characters/hearth_controller.rb b/app/controllers/characters/hearth_controller.rb
index f2d2bf7..abe8232 100644
--- a/app/controllers/characters/hearth_controller.rb
+++ b/app/controllers/characters/hearth_controller.rb
@@ -2,5 +2,6 @@ class Characters::HearthController < ApplicationController
def index
@all_amenities = HearthAmenity.all
@construct_activities = Activity.where("gid like ?", "construct_%")
+ @forge_activities = Activity.where("gid like ?", "craft_%")
end
end