Chris Oliver

Joined

292,890 Experience
93 Lessons Completed
295 Questions Solved

Activity

No, you shouldn't need to.

Posted in Your biggest aha! moment?

I've had so many of these over the years, they were clear moments when I could tell I leveled up.

I think one of the big ones for me was realizing that Rails, Django, and all the other frameworks are simply text parsers. They parse HTTP requests, organize the request for you in regular old Ruby code and then you get to choose what to do based on that. It's so unbelievably simple, but yet hard to wrap your head around as you start. That was big for me.

Posted in How To Use Turbolinks clearCache() Discussion

It's a Javascript method, so it must be done in Javascript. You only need to call this if data changes during a request. If you're making a POST/PUT/DELETE not via Javascript, you wouldn't need this because your browser will not be loading the next page view JS.

Posted in Could you make a ActiveAdmin episode?

Absolutely. It's the one I've used the most, even though it has plenty of warts. It's been on my list, just fairly low priority. I can make an episode on it pretty quick because I know it really well so I should be able to make it in some off time in the next week. :D

Posted in Recurring events with the ice_cube gem Discussion

simple_calendar doesn't include any CSS for the links, so it must come from somewhere else. It only has some optional CSS for styling the calendar, but not links.

Sounds like you may have created a scaffold and the scaffold.css file is styling your links.

Nah, no reason to use gemsets anymore because Bundler does everything they do, but in a better fashion. Because your Gemfile is included inside your repository, you always know which gems and which versions to use for each app. That pretty much removes any need for gemsets these days.

Yeah, it sounds like you understand it correctly. If you install a gem like Rails multiple times, you can have multiple versions of it on your system. It will always try to use the latest version if you say "rails new", but you can also specify the version to an older one if you want to generate an older Rails app.

The list of installed gems on your system will show everything. However the gems in your app's Gemfile will only be the ones you're using (for example, Rails 5 and it's dependencies).

Bundle takes care of the discrepancy to lock the version numbers down to the ones that each version of Rails or each app has defined. It can look through all the gems you have and say okay you have 3 versions of this, I want version X. It does that so you don't have to worry about it.

I have Rails 3.2, 4.2, and 5.0 installed on my computer and run apps on various versions regularly with no issues because Bundler takes care of everything. 👍

Posted in Connecting Ember with the Rails API Discussion

Great to know, thanks for sharing that. I'm sure it will be useful to other people. 👍

Perfect. Yeah the groupdate gem is handy for that stuff. You can write it yourself, but it's pretty annoying to remember it all. Works super nice with Chartkick.

What do you have right now?

I forgot to mention this, but I just posted this episode yesterday!

https://gorails.com/episodes/recurring-events?autoplay=1

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!