Santosh Turamari wrote:> I have an app in which, I have profiles which has friends list.. I want
> to apply some privacy settings as to allow, to visit only their friends
> in network..How to write the code in controller.. can anybody pls
> explain me.. I am new to ror.
That''s just implementating constraints via relationships. Assuming that
you''ve created some type of "User" and
"FriendsList" models, they
obviously have some sort of relationship. So in your controller actions,
simply access the friends list via the relationship.
If you don''t know how to do that, I strongly recommend that you buy and
read the newest (beta) edition of Agile Web Development With Rails:
http://pragprog.com/titles/rails3/
I hope that helps. Cheers,
-Nick
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---