search for: receiver_id

Displaying 3 results from an estimated 3 matches for "receiver_id".

Did you mean: received_id
2006 Apr 22
7
Proper Database Design For A Newbie
...L, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; CREATE TABLE `messages` ( `id` int(11) NOT NULL auto_increment, `message` text NOT NULL, `date` datetime NOT NULL default ''0000-00-00 00:00:00'', `sender_id` int(11) NOT NULL default ''0'', `receiver_id` int(11) NOT NULL default ''0'', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1; (I''m using acts_as_authenticated for my user management.) Whenever a message is sent, I want both the sender_id and the receiver_id to point to the user_id. I guess I am wantin...
2008 Feb 15
3
Destroy, dependent and performance
...oy a league, you send a message to all the users associated to this league. def destroy name = @league.name participants = @league.participants if @league.destroy for participant in participants @message = Message.new(:title => "blabla",:text => "blabla", :receiver_id => participant.id, :user_id => @user.id) @message.save(false) end flash[:notice] = "League ''#{name}'' was deleted, you are a criminal!" redirect_to route(''/leagues'') else flash[:error] = ''Something went wrong creati...
2011 Nov 18
0
Jquery dialog
...age i want to submit a from which appears from popup dialog.The action of the popup is going to send_message,Whenever i submits, via ajax the data gets stored but not the page gets reflected. My controller def send_message @message = current_user.messages.build(params[:message]) @message.receiver_id = @user.id respond_to do |format| if @message.save format.html {redirect_to user_url(current_user)} format.js end end end View file %div.jqmWindow#dialog %div.dialog_content -form_for Message.new,:url=>''users_message_path'',:remote=&...