Created
June 4, 2012 14:27
-
-
Save xenda/2868721 to your computer and use it in GitHub Desktop.
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
# Sitio 1 | |
class Product < ActiveRecord::Base | |
end | |
class ProductController < ApplicationController | |
respond_to :html, :json, :xml | |
end | |
# Cliente | |
class Product < ActiveResource::Base | |
self.site = "http://api.otrositio:3000/" | |
end | |
Product.first | |
Product.create name: "La mejor laptop de tooda tu vida" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment