Monroe Mann

Joined

6,990 Experience
55 Lessons Completed
1 Question Solved

Activity

Can you post a screenshot? Also come post on the GR Slack

We got this working, but... just because someone is 'logged in' doesn't mean that person is online.

We use devise and it allows members to stay logged in for long periods of time, just like most websites. But that doesn't really mean someone is 'online'. In fact, it may mean someone logged in 3 days ago but hasn't had any activity since.

We originally wanted to use this to help members find other members who were online in particular chatrooms, but the way this works, it's not based on actual recent user activity, but rather 'logged in' status (which is not very accurate at all).

Anyone have any idea how to modify this so it's actually 'real time' (within 5 minutes)?

Posted in Deliver Later not working

I am having the same problem. But in the rails server, it says 'deliver_now' even thought the code has it set to 'deliver_later'. And then, it doesn't even send the email.

Were you able to get it to work @Stephen?

Posted in Running multiple Rails versions

I am trying to test out the jumpstart rails template. However, I'm running into this issue. Something about different rails versions?

I read the above, but not sure how to fix this. Can anyone assist? Thank you very much.

https://i.gyazo.com/15e8841853fec069447c08b64d040092.png

Ahh, I see. I’m sure the advanced users will understand better.

What would be great is:

  • An example of a basic use case as you suggested
  • A tutorial how to switch from the earlier notification system to this new system

It looks quite amazing—it’s just overwhelming for someone at my level.

Thanks for the reply Chris!

Not sure anyone else finds this really difficult to understand. The original videos on adding notifications were very 'step by step' with clearer explanations. This seems like it's documentation for an expert coder. I fear anyone who is intermediate or lower is not going to be able to follow this. I certainly won't be able to implement this myself...

Posted in ruby on rails nested model relationship and routes

You're welcome Mike!

As for never nesting more than 1 level deep, that doesn't make sense to me, because in our situation, it makes perfect sense: Resources -> Sections -> Resource Links. And they ALL have to be linked to one another. So we have a bunch of resources (for example, Python), then we have 9 sections for Python, and each of those sections have individual links for that particular part of Python study.

I agree that you shouldn't have infinite nesting, but going 2 or 3 levels in is still manageable, and helps to keep our database very organized.

As for a good starting point, I feel that the ruby on rails guides are sometimes more confusing than other resources (at first). While I haven't checked out Richard's suggested blog post, I do know that absolutely nothing made sense until I found that digital ocean tutorial I shared above. After I read that, everything made sense.

As for Friendly ID, once you get things routed correctly, if you have issues still with FriendlyID, let me know!

If you need to do nested routes, this is one of the best tutorials I have found. Every rails coder should read this: https://www.digitalocean.com/community/tutorials/how-to-create-nested-resources-for-a-ruby-on-rails-application It doesn't go into detail on how to do double nested routes, but the principles are similar, with a few variations. For example, with three nested resources: dog, allergies, medications, for example, the most deeply nested path will be something like: dogs_allergies_medications_path. It took me a while to wrap my head around it, but eventually it made sense. Another lesson: with routes, you can pass multiple models through as parameters, and in fact, you have to in order to get the routes to work, like [@dogs, medications].

Once set up, using friendly ID is straightforward. The key is to first get the routes working normally. Then add friendly URLs thereafter.

Mike, I can help you with that. I finally figured it out. You can email me: roe@breakdiving.org I can also post how it is done here.

You can see it in action at breakdiving.io/resources/javascript to see how we are doing just that. Come join us :) It’s free to join.

Posted in Multiuser Live Video Chat in Rails Discussion

Thanks Chris! This is something we can investigate creating if we decide to move away from Zoom! Or, if this turns out to be more affordable than zoom :D

There is something called the Jumpstart Gem. It is created by Go Rails. It allows automatically installs many gems and css for you and sets up basic models and controllers so you are all set from the beginning.

Looks great! What's the main benefit to using Stripe with Pay, rather than Stripe solo? We have Stripe subscriptions already set up on our site. Would this augment what we already have?

Posted in Building AnimatedGif.me Part 1 Discussion

This is awesome Chris! Thanks so much! This will help me and my team better understand rails coding from start to finish!

Posted in Test Driven Development Basics Discussion

What is the test suite that Chris is using here? Is there a book that shows how to use this test suite?

Posted in ruby on rails nested model relationship and routes

Chris, it would be really great to see a video on how to set up nested routes properly. I have looked at every tutorial online, and nothing makes sense :D

Hi Ivan,

Above you wrote: "You will have to create the new and create methods for the journal of course for the form to work."

But later you said that "You would be initiating the form from your posts controller show or index methods."

Do I still need to create a new and create method for the journal? In a new journal controller, or in the posts controller? I think that's the last thing that is confusing to me.

Thanks very much!
-Monroe

Hi Ivan!

Thanks for this incredible assistance. I think I understand enough to try to get it working. I will report back how things go, and if I get stuck.

Monroe

Just wanted to truly say, "THANK YOU" to Chris Oliver. If it weren't for this amazing community, my team and I would be lost. It's because of him, and the wonderful people like you reading this who always answer our questions, that we are consistently making progress on our code base.

As a team of relative beginners, it's so nice to know we can always find friendly and supportive people here at GoRails. All of you also deserve a big round of applause.

Hi Ivan, a few questions, kindly:

1) Why would current_user.posts load a list of read posts? Clearly I am missing something, but it seems like current_user.posts would list all posts (read or unread) by the current user.

2) We actually want to show only the posts that have not been marked as read. To provide context, it's a message board, and we have a section called 'Hot Topics' which shows posts that have comments within the last 10 days. As soon as you comment on a hot topic post, it is removed from the hot topics list. But sometimes, you just read it, and decide not to comment. Users should still have the option to remove it, to reduce their hot topics list. So we want to put a 'mark as read' button on each hot topic. Then we will check to see if the post is 'hot' (has a new comment) and also 'unread'. Only if both criteria are satisfied, will it display. And any time a message is marked 'unread', if a new comment is added thereafter, it will again be marked as 'unread' and 'hot', and therefore, will again be displayed.

3) How do we actually set up the routes for this? Do we have to modify the routes file? Do we have to add anything to the form itself, so it knows where to 'post' to?

Ivan, this is wonderful! I am going to read through all this, and will get back to you with questions! Thanks for taking the time to provide such a thorough answer. I think it will help many others too!