Saturday, 7 September 2013

Rails: where to store something global is controlled by controller?

Rails: where to store something global is controlled by controller?

I have Users in my app. Each of them has a Facebook profile (Koala is used
for this).
So, I should store graph object anywhere. Next I should set facebook id
for this graph. I do it from controller because user click "Sign in" and
signs in.
Suppose User has friends: I want to get them by user.friends. This method
should return facebook ids of user's friends. So, this method should use
graph.
How to make all of this correct?

No comments:

Post a Comment