10 lines
232 B
Ruby
10 lines
232 B
Ruby
|
require 'active_resource'
|
||
|
|
||
|
class QueryResource < ActiveResource::Base
|
||
|
self.site ='http://localhost:3000'
|
||
|
self.element_name = "query"
|
||
|
has_many :entities, class_name: 'EntityResource'
|
||
|
def to_param
|
||
|
self.identifier
|
||
|
end
|
||
|
end
|