Chris Oliver

Joined

292,390 Experience
93 Lessons Completed
295 Questions Solved

Activity

Learning Vim proved to be super useful for me over the years! :)

Posted in The State_Machine Gem Discussion

I think you are right! I have just not used the gem that often since the last time and this wasn't available then. It does seem to be a community supported version that is the most up to date. Thanks for sharing!

I've had to do this before. I think you have to pass in an option into the autolink plugin (or copy it and write your own that uses target blank. Can't remember off the top of my head but I did ask about it in an issue on the Github repository.

Posted in What Is A State Machine? Discussion

Hahaha! If I had been brought up a few hours north I'd be calling it "pop" instead. :)

Posted in The State_Machine Gem Discussion

A crazy in-depth example is this for video games: http://jessewarden.com/2012...

They are a fantastic use case for state machines because you've got to keep track of so many things when it comes to power ups. Take just the ghosts in pacman for example: http://oddwiring.com/archiv...

I would say that if you want to try this out, try building a soda machine where you type in the various coins you put into the machine and it counts up and dispenses the soda (and change) once you've hit the correct price. You can just write these events out as strings into the console and that would be a good first experience with it.

Posted in Setup MacOS 10.10 Yosemite Discussion

Haha! You're welcome. :)

Posted in File Uploading with Carrierwave Discussion

Hey @renzomxdiaz:disqus,

It looks like maybe the filename is getting set as the picture attribute and not the file itself. In any case, are you trying to use my example code of how Carrierwave works behind the scenes or with Carrierwave itself?

Posted in The State_Machine Gem Discussion

You're welcome! :)

Posted in Open Source Vlog - Setting Up Rspec Discussion

Please do! Even if you just want to start with documentation, it will be a huge help! :)

Posted in User Authentication with Devise | GoRails - GoRails

I plan on doing an episode on it in the future so keep your eye out for that. :)

Posted in User Authentication with Devise | GoRails - GoRails

Absolutely! Just be aware that separate models means your users can't ever switch roles from employee to client or client to admin for example. This is definitely the simplest route, but you can also check out rolify if you want to use a single User model and allow users to have different privileges at will. https://github.com/RolifyCo...

Yeah they definitely changed the API. That's what I get for recording an episode on new software. Thanks for sharing that! :)

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

Thanks Eluwa! I really appreciate it! :)

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

Thanks for sharing Shebaz! Part of the reason I don't link to an automated process is because I want people to learn and understand how to setup their machine. It's good to be familiar with all the tools and their configurations. These automated scripts are perfect after you're familiar with the basics! :)

Posted in User Authentication with Devise | GoRails - GoRails

Yes! :)

Yeah in the database I think you would have both "users" and "something_users" tables.

Hey James! You can actually generate these types of nested models with Rails:

rails g model Blog::Post title

That will create the Post model nested inside the blog folder. The table name will be "blog_posts" because database tables don't have nesting. They just scope it by prepending "blog_" at the beginning in the database table. I agree with the StackOverflow poster in that you shouldn't try to override the table name to be safe. You can still scope it in your code and so long as you don't also create a "BlogPost" model, you will be fine.

Posted in User Authentication with Devise | GoRails - GoRails

Yep! It's called better_errors. Checkout this episode: https://gorails.com/episode...

Posted in Liking Posts | GoRails - GoRails

When you're not signed in, I render the like button, but it takes you to sign in instead of the AJAX code there. Tweaked that a bit because the AJAX code won't do the redirect with UJS properly.

Posted in Switch state of boolean field

Benny, this looks great. That's pretty much exactly what I would have suggested. :)

The only thing I'd say is to remove the console.log so that it doesn't crash in certain browsers like IE. For some reason it doesn't support that.