Chris Oliver

Joined

290,710 Experience
86 Lessons Completed
298 Questions Solved

Activity

Posted in New Design!

Tailwind has made design changes SO easy. It's definitely been my favorite tool I've started using in the last year.

Posted in Acts_As_Tentant User have access to many tenants

Hey Tim! I love that idea. I could see this being useful for Jumpstart Pro users. 👍 I'll leave a note on the GitHub issue for other people to find.

Posted in New Design!

Thanks Nick! That means a lot. I give TailwindCSS most all the credit for this new design. They have done a phenomenal job with their templates.

Yup, definitely want to hide that navigation if you're using this for real. :)

Should be pretty easy. Once the AJAX request succeeds, you can update the URL with a pushState. I would imagine you'd want pushState so you don't clobber the previous URL and it would keep the history as if you clicked each link. 👍

I bet this could be a great way to improve that. 👍

You're exactly right. If you send them over as an array, Rails can just loop through the array in the params and create them all one-by-one.

Then you just have to decide how you want to handle errors. Some cases you may want to cancel everything if one fails and return the error as JSON, or return JSON with two arrays of the successful and unsuccessful creates. Depends on what you need really.

Ryan Bates made a Railscast on this way back when I guess. http://railscasts.com/episodes/414-batch-api-requests I might have to do something similar in a future episode. 👍

Posted in Stripe Subscription with Initial setup fee?.

Looks like we've discussed this in the past here actually! https://gorails.com/forum/stripe-subscription-with-initial-setup-fee

Seems that you simply add the setup fee to the initial invoice of the subscription and future payments will just be the normal plan price. https://support.stripe.com/questions/add-a-one-time-fee-or-discount-with-a-new-subscription-plan

If you link to the page the post is on, you can set the anchor in the link to to scroll down to the comment.

For example, your post here has an anchor on it:

https://gorails.com/forum/question-regarding-the-threaded-comments-post-titles-or-link_to-post-only-if-the-current-user-is-on-another-users-show-page#forum_post_16256

You would link to post_path(comment.post, anchor: dom_id(comment)) which is basically what I'm doing, but mine are called forum threads and forum posts here on GoRails.

As long as the page is linked somewhere, Google will usually find and index it automatically, so you may not need to do this as

You could probably use the sitemap_generator gem to create sitemaps and point Google to it. https://github.com/kjvarga/sitemap_generator

Posted in Import into administrate?

You're welcome! Glad that worked out pretty easily!

Posted in Import into administrate?

The error sounds like you maybe didn't pass in a URL properly in somewhere. Print out the row["coverphoto"] to make sure it's a valid URL.

Also you should change the line to this:

    stadium = Stadium.create(name: row["name"],city: row["city"], image_remote_url: row["coverphoto"])

That will let Shrine handle it seamlessly for you.

Posted in How to have one application for multiple URL's

You can use request.domain to check the current domain and query your database for the account & logo you need to show.

Check out what DMARC is, it's the reason your emails are being blocked. https://dmarc.org/

Basically, they're not allowing these emails because they know they didn't originate from the correct server(s). That's what an attacker might do to spoof emails for phishing and things and they think you're doing the same thing.

Sendgrid's servers aren't used for mail.ru, so you can't send an email from there. If you want to send an email from a mail.ru address, you'd have to do it with mail.ru's SMTP servers. Same with GMail.

Generally, you'll want to use your own domain for Sendgrid and other transactional email providers. That's what they're designed for. Make sense?

It's definitely stable. GitHub and Shopify are often running these versions (or even newer) in production. Rails 6 has been out for many months and 6.0.3 is just a bugfix release to fix some minor issues.

Posted in Cookie Replay Attack

Posted in Import into administrate?

@Tommy, importing images from CSVs would be as simple as assigning the image to the record using the URL from the CSV.

For example, Shrine's remote url plugin would be all you'd need. https://github.com/shrinerb/shrine/blob/master/doc/plugins/remote_url.md

If your uploader doesn't support url uploads, you'd need to download the image temporarily using like OpenURI in Ruby and then assign the file object to the record before saving.

Posted in Group Chat with ActionCable: Part 6 Discussion

I've been recording an update series in Rails 6 that should be out soon. :D

Posted in Default Order of Associated Model Collection?

I know right?! Seriously amazing people here. Welcome to the group! 🤓