[Rails] Remote ActiveRecord relation (over network)
Hi,
I have a has and belongs to many relation between User and Article
models, and I would like to link them even if an article if not hosted
on the same database then a user.
For example, If an article exists at http://foo.com/articles/3 and a
user exists at http://bar.com/users/1, If would like to be able to do
from http://foo.com web interface or http://bar.com web interface this
kind of query: a_user.articles (or an_article.users).
I think this can be possible adding a field like "url" in users and
articles tables. But I don't know how to process for ActiveRecord. My
Article model looks like this:
class Article < ActiveRecord::Base
has_and_belongs_to_many :users
end
Is there yet some example of project using this kind of relation over
internet?
Many thanks
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home