After
I'm using Checking the rows, and seeing the plural id pass, but this action only trashes the record of 1 ID # when obtaining parameters To pass the parameters of this, all records need to do this in the dustbin? parameter action find_by_id instead of find_all_by_id and you will get all the conversations Garbage one by one Mailboxer gem.
{"UTF8" =>, "single" "Authenticity_token" = & gt; "35UoVt + dvwrGAgg + KZjn8jCZjlkdPj1ktCg5ASyCI4w =", "checked_items" = & gt; {"15" = & gt; "15", "14" => "14"}, "committed" => "Trash all checked"}
Disc referring conversation = Conversation.find_by_id (parameter [: checked_items]. Key) if the conversation current_user .trash (conversation) flash [: notice] = "Message sent to trash." Other Conversations = Conversation Search (params [: conversation]) conversations.each {| C | Current_user.trash (c)} Flash [: Notice] = "Trash Message." Instead of redirect_to: back end
Comments
Post a Comment