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?

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

  • Rick at Jun 11, 2012 at 3:02 pm

    On Friday, June 8, 2012 7:35:56 PM UTC-4, Ruby-Forum.com User wrote:
    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
    --
    You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
    To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/1WLORCq1Xp8J.
    To post to this group, send email to rubyonrails-talk@googlegroups.com.
    To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
    For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedJun 8, '12 at 11:36p
activeJun 11, '12 at 3:02p
posts2
users2
websiterubyonrails.org
irc#RubyOnRails

2 users in discussion

Cyber c.: 1 post Rick: 1 post

People

Translate

site design / logo © 2021 Grokbase