Skip to content
Snippets Groups Projects
Commit 58d560f5 authored by Mauricio Giacomini Girardello's avatar Mauricio Giacomini Girardello
Browse files

searching by object type name

parent 0e53b698
No related branches found
No related tags found
No related merge requests found
......@@ -27,10 +27,9 @@ class LearningObject < ActiveRecord::Base
name: name,
description: description,
author: author,
object_type: object_type,
object_type: object_type.name,
score: score,
published_at: published_at,
# publisher_id: publisher.id,
topics_name: topics.map(&:name)
}
end
......
class AutocompleteService
def initialize(url="http://localhost",port=4242)
@url = url
@port = port
end
def query(query)
return open( "#{@url}:#{@port}?q=#{query.downcase}" ).read
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment