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