[Rails] Re: Private Message System Rails 4
Hey Walter,
Your advice is really solid, and I appreciate it a lot. Thank you for
pointing out the note about pluralization. I fixed it accordingly.
However, I not follow you so well here:
> On Jan 9, 2014, at 10:55 AM, Robert Jewell wrote:
> This would be the proper inverse of the previous suggestion...
> Actually, reading through this twice before sending, I think the best
> thing for you to do is read this page:
>
> http://guides.rubyonrails.org/association_basics.html
>
> ...paying particular attention to this:
>
http://guides.rubyonrails.org/association_basics.html#bi-directional-associations
>
Moreover, I am not too sure if what I have done has further complicated
things :-)
I am trying to create a notifications center for my users to see their
project requests and private messages -- as well as any other related
activity in our community. There is a lot to see here with regards to my
application's file structure, and I would like to show you the repo.
However, its private, and I do not know how to let someone just view it.
I created a gist for you to see what I've done for the following tables
and models: PrivateMessage, User and Notification:
https://gist.github.com/rjewell2200/8364291
Also, here are the relevant routes:
https://gist.github.com/rjewell2200/8364263
and the routes.rb file: https://gist.github.com/rjewell2200/8364354
I've also created a model backed form to hit the database each time that
a user goes to another user's profile to send the recipient a message.
While each POST is adding rows to the notifications table, all of the
attributes of the notifications table are showing up as, nil. Here's the
gist for file containing the form:
https://gist.github.com/rjewell2200/8364382
Basically I think I've wired up everything correctly but every time I go
to another users profile to send him/her a message, I can not view those
notifications on the UI/UX and yet the model backed form is hitting the
notifications database, although the notifications table's rows are not
showing any of the rows attributes.
Can you guess why my polymorphic, notifications table is not receiving
the attributes from the submitted private messages? Also, each POST
fails to hit the private_messages tables as well.
--
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+unsubscribe@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/adc9cfb81c2dd11fab9b5db2925e4856%40ruby-forum.com.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home