Monroe Mann

Joined

6,750 Experience
53 Lessons Completed
1 Question Solved

Activity

Posted in Group Chat with ActionCable: Part 3 Discussion

This may help some of you.

If you find that this code doesn't work:

$(document).on "turbolinks:load", ->
  $("#new_message").on "keypress", (e) ->
    if e && e.keyCode == 13
      e.preventDefault()
      $(this).submit()

Try changing the last line to reflect an ID, like this:

$("#new_chat_message").submit()

For some reason, using (this) didn't seem to work for me, but using the ID worked great.

Posted in Advanced Mailboxer: Multiple User Conversations Discussion

Hello!

Does anyone know how to fix this issue? The ampersand is showing up in html, rather than showing the ampersand symbol. Ironically, Chinese characters show up fine. :D

https://gyazo.com/453666ac5e03a51dcde533c001f060d2

Thanks for any feedback.
-Monroe

Posted in Can a Rails app be converted into a Progressive Web App?

I know gonative.io can turn your rails app directly into a native mobile app on android and ios. I don't know if it works for APIs. Also, I haven't yet done it myself, but there's a cool feature on the homepage. Just type in your rails app url and it automatically shows you what it would look like as a mobile app. Costs about $600 I think to do the conversion.

Posted in In-App Navbar Notifications Discussion

This is the error in the rails console:

https://gyazo.com/c14ed47cb5fbe8dbf3cb7158c4865407

Does this mean I forgot to create a post method somewhere?

Posted in In-App Navbar Notifications Discussion

Okay! I'll try that. :D

Posted in In-App Navbar Notifications Discussion

I believe Chris created a newer video that shows how to do this using actioncable.

Posted in In-App Navbar Notifications Discussion

I have noticed this same issue. The bell itself doesn't appear for about 2 seconds, and then 3 seconds later, the notification number appears... If anyone has a fix, that would be great.

Posted in In-App Navbar Notifications Discussion

Hi Chris!

The notifications are working. What you call threads, we call posts, and what you call posts, we call comments.

Two issues:

1) It only works when the json.url line is commented out:

json.url post_path(notification.notifiable.post, anchor: dom_id(notification.notifiable)) 

As soon I uncomment, notifications totally stop working--the number disappears from the bell, and the notification messages themselves also disappear. Once I comment out the line again, the bell numbers return, and so do the notifications. Thoughts on how to get that to work? We definitely would like each notification to be linkable to that particular event.

2) we are showing messages for both posts (post_path) and also comments (comment_path). But how will index.json.builder know when to follow the post_path, and when to follow the comment_path? And then again, once we add other notifiable events, like reaching a higher level, etc.?

Thanks very much!
-Monroe

Ahh, once it's automatic, then it's all on autopilot, and that would be fantastic. Do you have any idea when they may be implementing the automatic referral payouts?

Also, do you happen to know if there's a way to setup 'repeated payouts', i.e. if you refer someone to us, then every time that person purchases something from our site, you would receive a 5% payout for that purchase for life? That would be neat.

Posted in Team tracking?

Hi Chris,

Is there or will there be a way to see which videos my team have watched, and how many, and what their XP scores are, etc, all on the team page? And see whether they actually watched, or just clicked 'completed'? Having some basic stats will help me to know who is taking advantage of the subscription, and who is not. It's not crucial, but would be helpful down the line to encourage more communication between the team, and to help me know what videos are of most interest to those on the team.

Thanks for your consideration.
-Monroe

Posted in Group Chat with ActionCable: Part 5 Discussion

Hi Chris,

Do you mean 10,000 simultaneous users of the chat, or just having 10,000 users on the site itself?

-Monroe

Posted in In-App Messages Between Users Discussion

Chris just answered my question in the Slack group. Here are the two answers:

1) @blatz was right about calling the association on a relation, User.all wouldn't be an individual record with associations, you could only call scopes on it. if you did User.first.conversations you could destroy_all. Or you can just use Mailboxer::Conversation.destroy_all.
Mailboxer models are namespaced, you can see them in the gem. It's one of those gems that referencing the source code comes in handy pretty often

2) The extraneous prinout is because you have an equals in your loop <%= when you don't want it. It should be <%

And... both answers were spot on (as if Chris could provide anything less).

Thank you to Blatz too for your help. Onward!

Posted in In-App Messages Between Users Discussion

I posted these questions in Slack, but also posted them here, because I'm sure the answer will help someone else:

I am working on the in-app messaging, and I have two issues:

  1. I am trying to delete all conversations in rails console. But when I type u = User.all and then u.conversations.destroy_all, it says it can't find that model.
  2. I don't know why, but there is database data showing up at the bottom of the conversations index, and also the message show pages. Like this: https://gyazo.com/b343640d979eb42f9c12c19c6d64a55d Does anyone know why that is showing up? The views have no extraneous code. (edited)

Thank you for your help!

Great stuff. Thank you again!

Question: if someone does end up refactoring or updating the gem, does that mean that suddenly our mailbox uploading feature will cease to function? Or would that only be an issue if we updated to a revised version of the gem without making the required new changes to the code?

Winner! :D

Agreed!

Finding GoRails is a Godsend. These videos are SO fascinating. Not only do I get step by step guidance adding a new feature, but I learn so much in the process. First I watch the entire videos straight through at 1.25 speed to get the gist and make sure I understand everything. Then I go back again and watch them at normal speed, pausing along the way to implement and test each step. It's really fun! And I get to see a new feature come to life before my eyes. Bravo Chris!

Posted in In-App Messages Between Users Discussion

Hi Chris,

Another fantastic tutorial.

a) If we install mailboxer and down the line want to give users the option to add multiple receipients, i.e. a 'private group chat', does mailboxer allow this? If so, this looks like a great option. *UPDATE: I see that video 3 discusses this. *

b) I installed notifications using your other tutorial. Should I use that same line of code here to create notifications in our bell, or is it best to use the mailboxer notifications? Or is it a combination of both?

c) I saw one person ask about how a user can trash/delete messages, but it doesn't appear you've yet responded. Is that covered as well?

Thanks ever so much.
-Monroe

Oh that sounds like a winner! And one I haven't heard of before. Thank you Chris.

I am trying to understand Ruby and Rails as best I can. I've purchased a bunch of ruby on rails books, but am wondering if you have any recommendations. Perhaps there are many I haven't yet read to help me get a better understanding of everything that's going on?

Thank you!
Monroe

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.