Using activeresource for client/server model

Hi,

i have a rails app running which has a DB of records. I wanted to develop a client app which can 1) view the records 2) edit them

So i have created a new rails app (for this client) and edited the model file "record.rb"

class Record < ActiveResource::Base   self.site = "http://0.0.0.0:3000" end

From the rails console of client i can access the DB records (Record.find :all etc ). But when i started a rails server on this client using a diff port , i cant retrieve the DB records . Anyone who have used Activeresource could throw some light on this?

Hi,

i have a rails app running which has a DB of records. I wanted to

develop a client app which can

  1. view the records

  2. edit them

So i have created a new rails app (for this client) and edited the model

file “record.rb”

class Record < ActiveResource::Base

self.site = “http://0.0.0.0:3000

end

From the rails console of client i can access the DB records

(Record.find :all etc ). But when i started a rails server on this

client using a diff port , i cant retrieve the DB records . Anyone who

have used Activeresource could throw some light on this?

Your class Record has the site and port hardwired in with the line: self.site = “http://0.0.0.0:3000

You need to change that to the new value and reconnect.

Rick