Chris Oliver

Joined

293,420 Experience
93 Lessons Completed
295 Questions Solved

Activity

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.

Posted in Switch state of boolean field

You'll have to do most of that in Javascript. When you click the button you'll send an AJAX request to the server (which can just hit the update action) and that will save the active/inactive state. That's really about it. You might checkout the ajax episode to wrap your head around this: https://gorails.com/episodes/jquery-ujs-and-ajax?autoplay=1

Ah ha! That would do it. :)

That's one of those times where turning on errors for this stuff in production is super helpful. Usually they don't throw errors so it doesn't break the website when an email fails to send...but this is kinda important to know!

Great question. In that case, I would probably try to rewrite that CSS so that it didn't conflict. Usually it's not super hard to do that (like renaming a higher level css scope or something). The worst case scenario is that you can't do that or it's too much work and you need to setup Rails to compile separate CSS files for those pages. In that case, you can follow something like this to compile various ones and save the trouble of rewriting chunks of the theme. http://stackoverflow.com/qu...

Good luck and thanks so much Francisco! :)

Posted in Using Purchased Themes with Rails | GoRails - GoRails

It's definitely dependent on the frontend developer and you've either got an easy or tough job cut out for you once you download the code. :)