diff options
author | David Gay <david@davidgay.org> | 2021-06-16 20:49:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 20:49:59 -0400 |
commit | 6dfaa7453591910e1373d92d8a09ddf384ebe834 (patch) | |
tree | ccec71ec425808ea82a3bfbcd36490f1cdcb666d /app/controllers/characters/spells_controller.rb | |
parent | 007896b0057b8aecbf74dddd269b57efe3f6e0e6 (diff) | |
parent | 0d6a82102061ff58b7ba34b09c4be9687c21ab2a (diff) |
Merge pull request #16 from dtgay/0.1.11
0.1.11
Diffstat (limited to 'app/controllers/characters/spells_controller.rb')
-rw-r--r-- | app/controllers/characters/spells_controller.rb | 9 |
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 |