# This example does an AJAX lookup and is in CoffeeScript
$('.typeahead').typeahead(
# source can be a function
source: (typeahead, query) ->
# this function receives the typeahead object and the query string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeScript +1.2k/ -485 βββββββββββββββββββββ 45.9% | |
JSON +11.8k/ -10.8k βββββββββββββββββββββ 19.8% | |
XML +249/ -250 βββββββββββββββββββββ 15.2% | |
JavaScript +270/ -245 βββββββββββββββββββββ 10.6% | |
Objectiveβ¦ +62/ -62 βββββββββββββββββββββ 3.5% | |
SQL +61/ -0 βββββββββββββββββββββ 1.6% | |
CSS +73/ -54 βββββββββββββββββββββ 1.5% | |
Dotenv +11/ -11 βββββββββββββββββββββ 0.6% | |
Prisma +16/ -10 βββββββββββββββββββββ 0.6% | |
Objectiveβ¦ +17/ -17 βββββββββββββββββββββ 0.4% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
π Morning 132 commits βββββββββββββββββββββ 31.0% | |
π Daytime 69 commits βββββββββββββββββββββ 16.2% | |
π Evening 222 commits βββββββββββββββββββββ 52.1% | |
π Night 3 commits βββββββββββββββββββββ 0.7% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Business < ActiveRecord::Base | |
searchkick | |
def search_data | |
{ | |
service_name: services.map(&:name), | |
service_description: services.map(&:description) | |
} | |
end | |
end |