summaryrefslogtreecommitdiff
path: root/app/controllers/characters/spells_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/characters/spells_controller.rb')
-rw-r--r--app/controllers/characters/spells_controller.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/characters/spells_controller.rb b/app/controllers/characters/spells_controller.rb
new file mode 100644
index 0000000..a0e6913
--- /dev/null
+++ b/app/controllers/characters/spells_controller.rb
@@ -0,0 +1,9 @@
+class Characters::SpellsController < ApplicationController
+ def index
+ @spell_activities = Activity.where("gid like ?", "havencast_%").where(innate: true).order(:name)
+ # TODO: Don't load into memory
+ @spell_activities = @spell_activities.to_a + current_char.learned_activities
+ .map { |la| la.activity }
+ .select { |a| a.gid.start_with?("havencast_") }
+ end
+end