diff --git a/lib/entity_resource.rb b/lib/entity_resource.rb new file mode 100644 index 0000000..cbebcd6 --- /dev/null +++ b/lib/entity_resource.rb @@ -0,0 +1,7 @@ +require 'active_resource' + +class EntityResource < ActiveResource::Base + self.site ='http://localhost:3000' + self.element_name = "entity" + +end \ No newline at end of file diff --git a/lib/query_resource.rb b/lib/query_resource.rb new file mode 100644 index 0000000..decfee1 --- /dev/null +++ b/lib/query_resource.rb @@ -0,0 +1,10 @@ +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 \ No newline at end of file