Activity
Posted in Non-series episode list?
No idea, but sounds about right. I also just might make some new series and make sure they all land in something.
Posted in Non-series episode list?
No, but that's a good idea. Every episode can optionally belong to a series, so if you primarily used the Series page to find stuff to watch, you'd miss out on the others. Maybe I'll make a special series of un-series'd episodes or something. :)
It's just an install of Bootstrap and Devise, both of which I've covered in other episodes. Just search for them and you'll be up to speed!
You might need to build your own storage plugin for Shrine if your SMB share isn't mounted as a disk somewhere.
Sounds like you could simply change your form on update to set the new field and hide the old one.
Hey James,
Have you seen this episode? This runs transcoding in a background job after upload: https://gorails.com/episodes/shrine-background-and-video-transcoding
Yep, you certainly could. If you need those features it'd be great. Otherwise, there's not a whole lot of difference.
Hey Afolabi,
It should be as simple as using SQLs group and sum functionality. For example:
Order.where("created_at BETWEEN ? AND ?", 1.month.ago, Time.zone.now)group(:currency).sum(:charged_fee)
{"CAD"=>82, "NGN"=>20, "USD"=>143, "YEN"=>40}
Order.where("created_at BETWEEN ? AND ?", 1.month.ago, Time.zone.now)group(:currency).sum(:network_fee)
{"CAD"=>"23", "NGN"=>"40", "USD"=>"60", "YEN"=>"30"}
Posted in integrating stimulus with ruby on rails
app/javascript/controllers
It creates an example controller in there when you install stimulus with webpacker. rails webpacker:install:stimulus
Posted in Grant all privileges problem
I think maybe you're mixing commands. When you create user, you specify the password. When you grant privileges, I don't think you want the "IDENTIFIED BY PASSWORD" part.
Here's a good little blog post that explains more about it. https://www.digitalocean.com/community/tutorials/how-to-create-a-new-user-and-grant-permissions-in-mysql
Posted in Error Tracking with Errbit Discussion
A) Yep, I use it for all my error handling. Deployed it with Hatchbox and it's on its own server. You'll just need to read up on all the ENV Vars you need to set.
B) Hmm, it's definitely not in Rails. Must have been something else we were talking about.
Great! Glad you got it working. 🙌
Usually there are 3 or 4 automatic retries on the card, and then the subscription is automatically cancelled. You'll get a webhook from Braintree for the cancellation so you can update mark the user as cancelled in your app.
Posted in Change Layout based on current URL
As a really trivial example, you can do what they mentioned on StackOverflow here: https://stackoverflow.com/questions/6748168/changing-rails-3-apps-layout-based-on-the-hostname-domain-for-branding
layout :domain_layout
def domain_layout
controller.request.host
end
Which would look for app/views/layouts/a123.mywebsite.com.html.erb, etc.
You can do other tweaks to that to decide which file to render.
Still made a GET request, so you know that your Rails UJS Javascript is broken if it's not making a DELETE request.
No route matches [GET] "/projects/1/delete_upload/2"
You made a GET request to the url, but your routes define a DELETE route.
You must add method: :delete to your link.
Posted in Setup MacOS 10.14 Mojave Discussion
Hey Ted,
If you upgraded, you probably need to uninstall the gem and reinstall it so that it compiles with the new Mojave libraries.
If you have trouble installing it from scratch, see this thread: https://github.com/brianmario/mysql2/issues/1005#issuecomment-424786695
Filter chain halted as :doorkeeper_authorize! rendered or redirected
That means that your API key was not passed over or not valid.
Posted in How do I add a conditional snippet of page specific javascript (likely a turbolinks issue)?
This would be slightly slower, but what if instead of opening the modal on page load, you make an AJAX request to retrieve the value of @show_modal, and then depending on the response, you open the modal?
That way you're not trying dealing with any cache related things at all.
Posted in How do I add a conditional snippet of page specific javascript (likely a turbolinks issue)?
Try adding some JS to hide the modal on the turbolinks:before-cache event so it doesn't ever get saved when open.