Class: Fafactory
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- Fafactory
- Defined in:
- lib/fafactory.rb
Class Method Summary collapse
-
.create_instance(service, model, data) ⇒ Object
Creates a new instance of a remote model using the data provided.
-
.find(service, model, id) ⇒ Object
Loads an instance of a remote model based on the id given.
- .purge(*services) ⇒ Object
Class Method Details
.create_instance(service, model, data) ⇒ Object
Creates a new instance of a remote model using the data provided.
6 7 8 9 10 11 12 |
# File 'lib/fafactory.rb', line 6 def self.create_instance(service, model, data) Fafactory.configure_site(service) result = Fafactory.post :create_instance, nil, { :model => model, :data => data }.to_xml return Hash.from_xml(result.body) end |