Robert Jewell wrote in post #1132839: > Hi Walter, per your request, here's a gist of my users_controller, which > corresponds with the form's view: > https://gist.github.com/rjewell2200/8364397 >
It looks like I found the problem. I needed to add the following code under the, send_private_message method, in the users controller: if @private_message.save flash[:notice] = "Message Sent." redirect_to root_path else render :new end @notification = Notification.create(notificationable_type: @private_message, user: current_user, notification: params[:notification]) end However, now a new problem has arrived. Numerically ordered numbers are filling the cells within the polymorphic column, t.string "notificationable_type" -- I do not know why this is happening and not the name of the type of object. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/705bedd3ded8a456eca6633091ed3d7a%40ruby-forum.com. For more options, visit https://groups.google.com/groups/opt_out.