Chris Oliver

Joined

295,510 Experience
98 Lessons Completed
295 Questions Solved

Activity

Yeah, some interesting changes in how forms work by default. I was disappointed to see that scaffolds don't submit forms with AJAX as that seems like one of the obvious places for them to change and show you how to submit and handle errors.

I'm planning on doing a deeper dive into Rails UJS to see all the new features soon. Seems like a lot has changed instead of it just being a direct port to remove jQuery like I thought it was supposed to.

You can actually use rails form tags and put your vue element inside it and on submit, look up to the form for the url, the method, and csrf token.

The reason I didn't do that here is because the new Rails UJS library was throwing some JS errors for me because it was intercepting the button clicks inside the form. I didn't have time to figure that out so I just removed the form and did it manually. Meant to mention that in the video as that's the way I would ideally set it up.

Well you wouldn't because it's up to your Javascript to generate the views dynamically. You would just cache the JSON response server side and the browser will generate the html from scratch every time.

Mostly the reason why AMS is used over jBuilder is that it's agnostic from the format. You can choose to output AMS in different formats using different adapters like the JSON API adapter. This means you can define the attributes and relationships of your data that you want to export, but you don't have to match that exactly with the JSON format. It becomes more interchangeable that way and you can make modifications a bit easier.

jBuilder is a lot more manual building out the exact structure of the JSON which makes it a bit harder to work with generally.

You've just got to download the backup, extract it, and reimport your database and do the same for whatever else you may have backed up.

Interesting, so that would mean that your filter is likely the piece that's not working correctly. You may want to also console.log tree so that you can see what that string is and verify that filter is working. I'd guess there's something up with that.

Hey Aaron,

What exactly is it that isn't working correctly? You said that it logs things in the console correctly, which I assume means that every time you change the first select, you always get it to log the correct options for the second one?

If those are the right options being printed from the second console.log in the change event, then maybe the problem is just the html call to replace the options?

Posted in Code Review: Run Number Refactoring Discussion

I didn't have time to get into that at all. One thing is that if you have a database unique index, then the database won't accept duplicate numbers which is good. You would probably want to add a "retry" in so that you could increment again and try that number maybe a few times.

Posted in Capistrano Rbenv Bundle Failed

Go right ahead. :D

Posted in Setup Windows 10 Discussion

I will try doing that! I've gotta get my Windows 10 install back working again. :S

Posted in Code Review: Run Number Refactoring Discussion

Sorta useful but if we wanted a simple increment always we could just use the database for that. Since we have more logic like years restart the count (or the numbers could be not successive in a lot of cases) that won't help in every case.

Always great to use those little ruby niceties when you can though! Thanks for the reminder!

Posted in Code Review: Run Number Refactoring Discussion

Either one would be great or JS samples even!

Posted in Capistrano Rbenv Bundle Failed

This is fantastic, keep hustling on it! :D Having more native screencasts is going to help so much!

Posted in Capistrano Rbenv Bundle Failed

Great work detective! :D

Posted in On what server is Gorails hosted?

Yep, and just for reference I use a 2GB server for it, but was on a 1GB server for a long time.

Posted in 2 sites... 1 DB?

Oh the good old Joomla days! I tried to experiment with that and Drupal a bit and never could quite wrap my head around them.

You guys should both check out ActiveResource sometime btw. It's like the best API implementation you can get between Rails apps because of how seamless it ends up being. That's one that I always wished had turned into more of a thing, but at the very least it can make for a fanastic influence for the way you design your API clients.

This API thing actually came up recently with GoRails because as I was building Hatch I was like man, it'd sure be nice if you were automatically signed in because you were logged into your GoRails account...I never did end up doing anything with it, but it's certainly something I would like to address in the future. It would be similar to what Alan needs to do.

Posted in How can I setup Cloudfront CDN for Rails App ?!

That's where I got the snippet from actually. Forgot to paste the link. :)

Posted in Capistrano Rbenv Bundle Failed

Your nginx config is probably not pointing to the right directory or something for the Rails app or you just needed to restart nginx after you changed the config.

Posted in Capistrano Rbenv Bundle Failed

It says "Killed" on the last line which means your server ran out of memory while installing gems. You can just try redeploying and that should help, but you'll keep having this problem until you upgrade to have a bit more RAM.