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.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/characters/spells_controller.rb b/app/controllers/characters/spells_controller.rb
index 9694856..a0e6913 100644
--- a/app/controllers/characters/spells_controller.rb
+++ b/app/controllers/characters/spells_controller.rb
@@ -1,5 +1,9 @@
class Characters::SpellsController < ApplicationController
def index
- @spell_activities = Activity.where("gid like ?", "havencast_%").order(:name)
+ @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