Chris Oliver

Joined

291,480 Experience
86 Lessons Completed
296 Questions Solved

Activity

Posted in Building A Hosting Platform in Ruby Discussion

Just thought I would share this in case anyone is interested how Hatchbox.io works. 👍

Posted in Rails & Vue.js Trello Clone - Part 1 Discussion

I literally just rebuilt the comment system (replacing Disqus) so there are some bugs. 🤓

You can think of that approach as similar to binding your events in jQuery. I worked on a nice little wrapper for that which I need to release. And once I get a chance to check out this other approach, I'll let you know. Might be a better way to structure things. 

Posted in Rails & Vue.js Trello Clone - Part 1 Discussion

Hey Justin,

You can do multiple components on a page by creating multiple Vue apps. You'd basically just mount your different Vue apps to the appropriate tag, if you find them on the page. You won't necessarily have them on every page, so you'll need to conditionally check to set them up. 

This is what I do with the Vue-Turbolinks integration. You can see an example here that checks each turbolinks pageview for the components and then sets up the vue app. https://github.com/excid3/vue-turbolinks#running-vue-only-on-specific-pages

You'd just do the same thing basically. 

I also noticed that Laravel seems to have an interesting way of doing things that is using the whole server sided rendered HTML as the main component. It seems like it might be a really useful way of doing an even nicer middle ground.
Thanks Stephen! Good catch on the YouTube URL.

Thanks for sharing Neil!

Hahaha I noticed that too while editing. Forgot I was recording without power. :P

Posted in Hatch login Error

No problem! I just disabled it temporarily for you. You should be able to login without it. Let me know if that works!

Posted in Handle 404s Better Using Rescue_from Discussion

You can also use .none? to check the opposite as well. 👍

Posted in Stimulus JS Framework Introduction Discussion

Yes, you can definitely do that. Maybe I'd do that for different things like "admin" area components and so on.

Posted in Stimulus JS Framework Introduction Discussion

Basically just one controller per feature. You should never do page specific JS or CSS because that means you can't move your features to different pages on your site later on which inevitably always happens.

Posted in Setup MacOS 10.13 High Sierra Discussion

You should never use sudo to install gems. If you get permission denied, you didn't get Ruby installed correctly and should go through those steps again.

Posted in Stimulus JS Framework Introduction Discussion

This section in the docs mentions that you can only use hyphens in the controller name in your html. It maps to either a hyphenated or underscore controller.js filename though. https://github.com/stimulus...

And yeah I think this is a nice clean way of refactoring those CS classes. You no longer have to deal with managing event listeners and can purely focus on the code that runs for each event. 👍

Correct. The server doesn't have a clue who you are unless you give them a JWT or a session cookie. Your browser automatically sends cookies over in every request so it makes things easy that way. With JWTs, every request your code makes to the server must manually include it.

Yeah, Vagrant is probably what you'd want in this case. Docker is more for you to containerize your app so it could run anywhere, not necessarily for mimicking your existing production host.

You'd just want to install the same OS version as prodcution and the same packages in Vagrant.

Posted in Stimulus JS Framework Introduction Discussion

I get the feeling that Basecamp won't build out those kinds of features and will keep this generic, but it is the perfect opportunity to build a library on top of stimulus to make validations easy I would imagine.

Posted in Stimulus JS Framework Introduction Discussion

Hit me up with your questions! I'm still learning it too, but the good news is that it's pretty straightforward so there isn't _too_ much to learn.

Posted in How can I setup Vim for rails development on Ubuntu?!

You're welcome!

Btw, you can remove the duplicates of those lines and that should work fine if you want.

export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/.rbenv/plugins/ruby-build/bin:$PATH"
eval "$(rbenv init -)"

Posted in How can I setup Vim for rails development on Ubuntu?!

I'd guess that p[robably is coming from this command (line 10) https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/rails/rails.plugin.zsh#L1

I'm not quite sure why it isn't finding the rails command though. Maybe the Rails command isn't in your PATH in ZSH and when you load bash it updates your PATH?

Have you added rbenv's stuff into your .zshrc? That's probably it if I had to guess.

There are many ways to talk to an API. HTTParty, RestClient, etc are all options you could use.

Posted in Tracking Metrics with Ahoy and Blazer Discussion

That's really cool, thanks for sharing!