Chris Oliver

Joined

292,970 Experience
93 Lessons Completed
295 Questions Solved

Activity

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

Hmm, maybe these help? http://stackoverflow.com/qu...

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

What's the output it's giving you?

I was just going to give you a heads up: I re-recorded this episode and think it's a lot more clear this time. :) Thanks for your help because it definitely needed to be cleaned up!

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

That's exactly the command and the location you need to in order to do it.

Are you sure you're in the right directory? When you run ls it shows all the files in your rails app?

I think when you set config.time_zone that actually changes the database values and does not store them as UTC anymore. You can verify this by saving a time like 4pm and seeing if 4pm shows up in the database or a different time. If they are the same, then it means that it is not saving the times as UTC. If they are different, then that means it has converted it to UTC to save to the database.

I usually recommend saving always to UTC in the database so that in the future if you need to have custom times for all your users, you can adjust Time.zone on the fly or use the local_time gem.

Let me know what you find out about config.time_zone because I always forget if it modifies the ActiveRecord time conversion or not.

I think usually the config.time_zone complains when you set it to an invalid date option so it doesn't seem like that's the issue.

One thing to point out is that you should almost never use DateTime.now and you should always go with Time.zone.now just to be safe.

Maybe try swapping the DateTime ones out with Time.zone and see if that helps?

You can use Rails UJS directly to do that. I use this and the @form variable is just a jquery selector for the form

$.rails.enableFormElements @form

Thanks for the tips! I'm not a Vagrant expert, so #2 was new to me. The chef recipe used to install bundler for me, but it doesn't seem to anymore either. Super annoying.

No worries! I'm going to re-watch it tonight because I'll probably have the same feeling and get you a much cleaner example including the controller that I eluded to but never showed. Showing the controller will clear up a lot of things I think.

I might re-record it with a clearer example. It could be explained a lot better.

Well, we actually eager load the sections, steps and privacy settings at the beginning through the course. That's all done and was the obvious thing to look at for performance, but the real bug here is more subtle in that we've loaded the object already but weren't referencing it correctly.

Those are all equally important in building performant responses though!

Pretty soon! It's a lot of content so I need to make sure I plenty of time to plan it all out.

Posted in Idea for TimeClock Need Advice

You gotta start somewhere. It's like art, just start painting. You can't plan a masterpiece, you've got to feel it out as you go (which is my main issue with TDD).

Last night I rewatched these two episodes and they gave me a lot of ideas on maintainable code:

https://www.youtube.com/watch?v=yhseQP52yIY
https://www.youtube.com/watch?v=mWo3oEwFFzM

Posted in Setup MacOS 10.10 Yosemite Discussion

Hey Sarah, if you haven't fixed this yet, the error basically says that your database password doesn't match what was set up with MySQL. If you used homebrew to install it, then the username is usually the same as the user you login as and the password is empty.

Posted in Idea for TimeClock Need Advice

Yeah refactorings are always really painful like that because you can't merge in the main application ever when it updates around this same code. This is where testing really shows its value, but versioning doesn't have a good way to handle this yet.

Posted in PDF Receipts Discussion

I will check it out! I did some research and can't remember why I picked prawn other than I saw enough other people using it and documentation seemed robust. That said, I bet wkhtmltopdf is way easier now that I've used Prawn more than a little.

The hardest part was building our completion certificates at OneMonth.com in Prawn. It was is finicky and time consuming.

Posted in Problem with upgrading to Rails 4.2.2

Haha! I was reading the title and was like hmm, I don't think I've upgraded to Rails 4.2.2 yet either. ;)

Posted in Idea for TimeClock Need Advice

If you're building this into an existing app, a branch makes sense. If you need to quickly prototype it without trying to fit it into the legacy code, it might make sense to try out a new app, but you'll still have to integrate it with the legacy code at some point. I'd probably go with the feature branch.

Posted in Recurring Events

Neat, I didn't know about Recurring Select. What kind of params does the recurring_select field send over? Their Readme doesn't really explain that.