create table friends ( id int not null auto_increment, user_id int, friend_id int, constraint fk_friends_accounts foreign key (user_id) references accounts(id), foreign key (friend_id) references accounts(id), primary key(id) ); this is my friends tables..friend_id is the field where ids of the user are filled but before filling that friend_id field,a request is to be sent to the user who is supposed to be added. here i request suggestions for how to send that friendrequest... thanks in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
you can: - create but not activate such an entry - send your request - activate your entry by receiving the answer from the user On 4 Jul., 06:14, gow <gowtham.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> create table friends > ( > id int not null auto_increment, > user_id int, > friend_id int, > constraint fk_friends_accounts foreign key (user_id) references > accounts(id), > foreign key (friend_id) references accounts(id), > primary key(id) > ); > > this is my friends tables..friend_id is the field where ids of the > user are filled but before filling that friend_id field,a request is > to be sent to the user who is supposed to be added. > > here i request suggestions for how to send that friendrequest... > > thanks in advance.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
thank u lanzem, can u plz explain in detail how can i send request to other user. lets leave activation part aside for sometime. thank u once again.. On Jul 4, 6:29 pm, lanzm <marcel.l...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> you can: > > - create but not activate such an entry > -sendyour request > - activate your entry by receiving the answer from the user > > On 4 Jul., 06:14, gow <gowtham.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > create table friends > > ( > > id int not null auto_increment, > > user_id int, > > friend_id int, > > constraint fk_friends_accounts foreign key (user_id) references > > accounts(id), > > foreign key (friend_id) references accounts(id), > > primary key(id) > > ); > > > this is my friends tables..friend_id is the field where ids of the > > user are filled but before filling that friend_id field,a request is > > to be sent to the user who is supposed to be added. > > > here i request suggestions for how tosendthat friendrequest... > > > thanks in advance.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Straight from the Rails wiki: http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer Cheers, Chris> thank u lanzem, > > can u plz explain in detail how can i send request to other user. > > lets leave activation part aside for sometime. > > thank u once again..--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
i did see that link..Chris. i basically want to send a ping messages to user stating that "so n so send u a friend request" when he logs in. Will this be possible.I even don''t know where to start.any suggestions plzzzzzzzzz. thank u for reply..Chris. On Jul 5, 10:50 am, Chris <Chris.Hughes.Perso...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> Straight from the Rails wiki:http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer > > Cheers, > Chris > > > thank u lanzem, > > > can u plz explain in detail how can isendrequest to other user. > > > lets leave activation part aside for sometime. > > > thank u once again..--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
you can render such "received requests" into a messages-view of your logged in user. just store the friend_request the sender created as a FriendRequest instance, set the name of the recipient and mark this request with a meaningfull state (e.g request_sent) then if a user is logged in, render its "received requests" area with something like that @received_requests FriendRequest.find_by_recipient( session[:user].id )> > > can u plz explain in detail how can isendrequest to other user.if I go deeper, I''ve to write code. So you should get the point.> > > lets leave activation part aside for sometime.you can''t. the "activation part" is the state of your FriendRequest... On 5 Jul., 10:19, gow <gowtham.b...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i did see that link..Chris. > > i basically want to send a ping messages to user stating that "so n so > send u a friend request" when he logs in. > Will this be possible.I even don''t know where to start.any suggestions > plzzzzzzzzz. > > thank u for reply..Chris. > > On Jul 5, 10:50 am, Chris <Chris.Hughes.Perso...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote: > > > Straight from the Rails wiki:http://wiki.rubyonrails.org/rails/pages/HowToSendEmailsWithActionMailer > > > Cheers, > > Chris > > > > thank u lanzem, > > > > can u plz explain in detail how can isendrequest to other user. > > > > lets leave activation part aside for sometime. > > > > thank u once again..--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---