Chris Oliver

Joined

290,710 Experience
86 Lessons Completed
298 Questions Solved

Activity

Posted in Turbolinks 5 Forms for Mobile Discussion

I spent a bunch of my day yesterday learning iOS so I think we'll be able to make some great little example apps in some episodes soon. :D

Posted in Liking Posts Discussion

All you have to do is add a controller for it and then you can loop through current_user.likes.each do |like| and print them out on the page.

Posted in Multitenancy with the Apartment gem Discussion

I'm not sure that it does. The only gem version that looked compatible was the very first release of it. Probably isn't worth using.

Posted in Subscriptions with Stripe Discussion

I'm not familiar with it, but it sounds like somethings up with your config there if your environment variables aren't being set. I'd double check all that stuff for production with dotenv because that seems to be your culprit.

My approach is usually to create a separate secrets.yml that only lives on production servers instead of using Dotenv.

Posted in Subscriptions with Stripe Discussion

Hey James, are you using Figaro for the .env file?

Posted in Video Series on Security for rails?

Really awesome idea for a series. I definitely want to do this as there are just so many things to cover and even if I just introduced the various things, it would be helpful. I'm going to make sure this is on my list to prioritize.

That makes sense. You may want to make Brand a separate table so it can have all its own fields separate from Company.

It feels separate logically, and probably would be safest to separate out instead of saving them both to the same table. It also helps make the relationship easier where a Company can have many Brands. If you did them as a single table, you'd have a lot of self-referential stuff going on and I'm not sure that'd be good.

The only downside to separating them is that sometimes you might have a Company that only has one Brand and it's basically the same details for both.

Ah, so Company and Brand are effectively the same thing. That's interesting to know. You might check out STI (Single Table Inheritance) for those. It lets you use the same table for two different types when they share pretty much all the same fields.

Venues makes sense as a different table. You'll probably want some more for Products as well.

Definitely draw it out on paper. I often will do that and it helps you figure out what types of things you can and can't do with your data structure that way.

I think you're on the right track Alan. Do Venues sell all the Brands of a company or just specific ones? You might want a relationship between those two as well.

Posted in Setup Windows 10 Discussion

Good to hear! This has to be frustrating.

Posted in Setup Windows 10 Discussion

Seems they've been making some changes to it, one of those being it's not a login shell, so you'll have to do "bash --login" for now. Still other outstanding issues. Maybe they'll get some of them fixed soon.

Posted in Setup Windows 10 Discussion

Makes sense with the login shell. I wonder why they changed that, because I don't think that was how it used to be. Going to frustrate a lot of people if they keep that as the default.

Posted in Group Chat with ActionCable: Part 5 Discussion

What we setup earlier was Devise so that you can login and since WebSockets share the same cookies a web request does, when you connect to the WS, it will log you in with Warden (devise's underlying authentication layer) and let you use the WebSocket. Then we have access to the current_user method inside ActionCable just like we do in a normal web request.

On the frontend, you can add a current-user meta tag keep track of it in your JS so that you can customize your frontend to handle things differently if you're not logged in, etc. Check out this episode for more on that: https://gorails.com/episode...

Posted in Problems Viewing Videos

That's what I figured. 😉

Posted in Sending Emails with SMTP and Sendgrid Discussion

Thanks man! :)

Posted in Problems Viewing Videos

That's super weird! Just tried it on my Mac and got the same issue. Played about 3 seconds and then stopped. It's definitely the autoplay.

What's funny is that code has worked for a long, long time. I think it's something on Wistia's end. I know they often update the player internals, so it must be something odd the way I'm setting it up. Maybe it's now executing too quickly and causing the player to mess up because it hasn't fully initialized or something.

I'm disabling it temporarily now, so at least we have a fix that will work.

Posted in Problems Viewing Videos

Hey Frank,

Thanks for the heads up! Somebody mentioned playback issues on Slack yesterday. First I had heard of it, but that's obviously a huge priority to fix. It's possible Wistia is giving some troubles or something. The free videos are hosted on YouTube so they're different than the paid ones which are on Wistia.

Are you having issues with both or only Wistia? What browser / version and OS are you on? Also if you open up the browser JS console, do you see any JS errors on the page?

Posted in Setup Windows 10 Discussion

Curious to hear what you find out. I didn't have any issues personally, but only tested rbenv. Now my Windows 10 install is borked and I haven't had time to fix it so it boots again.

Posted in Setup Windows 10 Discussion

Not entirely sure on that one. Have you guys tried using rbenv instead?

1. Usually I would say never to modify those and instead override them with your own styles that are included afterwards. It's a bit more work to do the overrides, but if/when they release a new version of the theme, you can replace the vendor files and all your overrides will still exist. It's really, really hard to keep track of what you changed if you modify the original theme. Of course, things like image links in the CSS probably need to be changed regardless, so you may have to make some modifications to the original theme no matter what. The fewer changes you can make, the better.

2. The <%= yield %> is there so that the layout knows where the main page content from the views should get inserted. You can also use it for some other things, but yield without any parameters tells your template where you want the main page content to be.

3. If they're CSS files you can do the same thing as I did, except you can't use variables. Both LESS and SCSS compile down to regular CSS so you can use them together, just in separate files. I believe you can also change the theme's filenames to .scss if you wanted because CSS is all valid inside SCSS. Kinda confusing but you should be fine leaving them as .css and doing the imports like I showed.