Chris Oliver

Joined

291,200 Experience
86 Lessons Completed
299 Questions Solved

Activity

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

Ah ha! I know some of them lock it down by default to improve security. Makes sense that would be the reason!

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

Hmm, hard to say. Maybe restart nginx to make sure you got your config for the rails app loaded?

Posted in Sending Emails with SMTP and Sendgrid Discussion

Unfortunately, styling emails is still pretty nasty these days. You generally will see people using tables to do layouts because email applications don't generally support the full CSS suite of features for various reasons (including security). Lots to find if you google "html emails" or "email layouts".

As for images, Rails lets you include them as normal, but you have to specify the asset host: http://edgeguides.rubyonrai...

Posted in Searchick filter with scope

@Marc because you're using an enum, the database and search is only going to store 0 or 1. You have to query for the number, not the string :published. That's probably your issue there.

Posted in Direct File Uploads to S3: Part 3 Discussion

Hey Hal, good find. I think I noticed it but it was subtle enough with small files I didn't catch it.

The solution should be to delete the existing file field from the FormData object before you append the jquery file upload one.

      var form      = $(this).closest("form");
var form_data = new FormData(form[0]);
form_data.delete($(this).attr("name")); // Remove the existing form field
form_data.append($(this).attr("name"), JSON.stringify(image)); // Add our json version

Posted in Setup MacOS 10.12 Sierra Discussion

There's actually a bug right now (in the last 2 hours) with the thor gem causing problems in new apps. Try this: http://stackoverflow.com/a/...

Hey Masud,

Absolutely. The way it's designed is that you can create a new channel for each feature you want and the ActionCable code internally will automatically separate out the messages for each of those channels. That means you can have one for notifications and one for chat and they will be separated out between those channels.

Posted in Pretty urls with FriendlyID Discussion

Looks like possibly @job is nil? Also happy thanksgiving! :D

ElasticSearch + Searchkick is awesome. I need to get GoRails search swapped over to it very soon!

Posted in Direct File Uploads to S3: Part 3 Discussion

It's the exact same process if you look into what they do. I recommend Shrine because then you can take advantage of all of the features of it after the file is uploaded such as image processing, thumbnails, background processing, you name it.

Posted in Subscriptions with Stripe Discussion

Happens to the best of us. 🤓

Posted in Subscriptions with Stripe Discussion

Hey Liz! :D

I would say, try restarting your Rails app. If you make a change in any of your config files, you generally have to restart your Rails server so it can get the new changes. The rest of the code auto-reloads when you make a change but this stuff does not.

I think you're close, but you want an array of hashes.

Person.search params[:q], {
fields: [{name: :text_start}, {breed: :text_start}],
limit: 10
}

The searchkick docs also show another method, putting the autocomplete types on the searchkick method in the model and just listing out the fields by name. https://github.com/ankane/s...

Posted in Remove omniauth and convert existing users

OAuth definitely gets tricky pretty fast, especially when some services like Twitter don't give you an email, so you can't create User records without asking and so on.

When you try it in the console, try printing out user.errors when the save fails so you can see what the errors were. It could be one of your validations failed and that will let you know what went wrong.

Posted in Need another series on Rails with Angular 2

ABSOLUTELY! :D

Going to cover short introductions to React, Angular, and Vue when I get back from Thanksgiving.

Posted in Upgrading simple_calendar for Rails 5 Discussion

For both recurring events and various types, you just have to make them into one array and pass them in. So rather than calling them @dances, you might use @events and create it like so:

@events = Dance.all + Meeting.all

I just recorded a basic episode on recurring events, but you'd just generate them in memory and add them into this @events array. The calendar doesn't need to know anything about recurring events, just needs the individual events to display.

Posted in Setup Windows 10 Discussion

Hopefully that default changes in Windows as that's unexpected behavior from anyone who is used to opening bash with a login shell automatically on any Linux install.

Posted in Setting Up Rails 4 with MongoDB and Mongoid Discussion

Thanks for sharing all this Matt! Will be useful for anyone reading this as I think it was originally written for Mongoid 4.

It's great to hear that they finally got the ActiveRecord + Mongoid stuff working nicely. I remember it wasn't super doable last time I used it because of some incompatibility.

Yeah, thanks! I know that the react_on_rails gem actually uses webpack for compilation but uses the asset pipeline for the embedding into Rails which is nice. I'll have to dive into these articles soon and start planning a webpack episode.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.