scaffeinate / socify

:rocket: Socify is an open source social networking platform written in Ruby on Rails
http://socifyapp.herokuapp.com
GNU General Public License v2.0
375 stars 211 forks source link

Added user mentions to posts and comments #15

Closed Peterortiz82 closed 8 years ago

Peterortiz82 commented 8 years ago

What is this?

Users can now mention their friends in a post or in a comment. This will create a link to the mentioned users profile page in the post/comment.

What did I do?

I added the jquery-atwho-rails gem that made it possible to mention friends. I created a Mention module that is currently being used in the Post and Comment class.

Screenshots

screen shot 2016-05-22 at 6 38 10 pm screen shot 2016-05-22 at 6 38 37 pm screen shot 2016-05-22 at 6 38 51 pm screen shot 2016-05-22 at 6 39 38 pm screen shot 2016-05-22 at 6 39 53 pm

Feedback

I'm still pretty new to programming and was having trouble getting the mentionable_user_path(current_user) to work in a .js file since I needed the current_user id. I had to includ the JQuery in script tags in the post & comments _form partial. I'm not happy with that and would rather have all of the JS in the correct files and not in script tags. If you know of a solution to this please let me know and I will update the code. Also, any other feedback would be appreciated. Thanks.

scaffeinate commented 8 years ago

@Peterortiz82 Well this is really awesome. Let me just check on that. Will merge it soon. Great work! 👍

Peterortiz82 commented 8 years ago

Thanks!

scaffeinate commented 8 years ago

@Peterortiz82 This is pretty awesome feature. Why didn't I think of this. I might have an alternate approach with the path thing. Let me make the changes and merge this. :+1

Peterortiz82 commented 8 years ago

@sudharti Sounds good! 👍