#= Controller for user functionality
class LookupsController < ApplicationController
  include CourseHelper

  before_action :require_permissions
  respond_to :json

  def fetch_course
    return unless params.key? :course
    @course = find_course_by_slug(params[:course])
  end

  def cohort
    fetch_course
    @model = 'cohort'
    @key = 'title'
    @values = Cohort.all.pluck(:title)
    render 'index'
  end

  def tag
    fetch_course
    @model = 'tag'
    @key = 'tag'
    @values = Tag.all.pluck(:tag)
    render 'index'
  end

  def article
    fetch_course
    @model = 'article'
    @key = 'title'
    @values = Article.live.namespace(0).select('title').pluck(:title)
    @values.map! { |a| a.gsub('_', ' ') }
    render 'index'
  end

  def user
    fetch_course
    @model = 'user'
    @key = 'wiki_id'
    @values = User.all.select('wiki_id').pluck(:wiki_id)
    render 'index'
  end
end

#= Controller for user functionality
class LookupsController < ApplicationController
  include CourseHelper

  before_action :require_permissions
  respond_to :json

  def cohort
    @model = 'cohort'
    @key = 'title'
    @values = Cohort.all.pluck(:title)
    render 'index'
  end

  def tag
    @model = 'tag'
    @key = 'tag'
    @values = Tag.all.pluck(:tag)
    render 'index'
  end

  def article
    @model = 'article'
    @key = 'title'
    @values = Article.live.namespace(0).select('title').pluck(:title)
    @values.map! { |a| a.gsub('_', ' ') }
    render 'index'
  end
end

Remove dead code from LookupsController.
Remove dead code from LookupsController.

The course is not used at all, and the user method doesn't get called from anywhere. These all get called through the Lookup component, which is ultimately called from the cohort_button (for cohort lookup), the tag_button for tag lookup), and the assign_button (for article_lookup). The user lookup is not used anywhere that I can find (and the code does not get hit by the specs).
