Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby

Login to specific pages in Rails

I'm setting up a basic rails website/application and my plan is that the website will be open to everyone but I do want to have the option to edit the DB (Currently using the edit pages generated by scaffold).

In short, I want these pages to be blocked to everyone and only be accessed by using a user name and passwords. What's the simplest way of achieving that?

Thanks!

1 Answer

you could use an authentication system like Devise. . the other option is rolling your own authentication system. you should take a look at this treehouse course or the Rails Tutorial by Michael Hartl which covers rolling your own authentication system in great detail