NerdDiffer/job_tracker

View on GitHub
app/controllers/search_suggestions_controller.rb

Summary

Maintainability
A
0 mins
Test Coverage
class SearchSuggestionsController < ApplicationController
  before_action :logged_in_user

  def index
    term = params[:term] # set by jquery-ui/autocomplete
    key  = params[:key]  # set by coffeescript
    suggestions = SearchSuggestion.terms_for(term, key)
    render(json: suggestions)
  end
end