Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Base starter project for using Devise with HAML and the 960 grid system.
tree: 42b3ab3540

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
autotest
config
db
features
lib
public
script
spec
vendor/plugins
.gitignore
Gemfile
README.rdoc
Rakefile
config.ru

README.rdoc

Welcome to Devise_Base

This project is a Rails 3 starter app that includes Devise as its authentication solution. I chose Devise as my authentication solution for the following reasons:

  • It is a very complete authentication solution providing user authentication, token authentication, email confirmation, password recovery, user registration, user session timeout, basic email and password validation, account locking, user statistics tracking, and remember user functionality.

  • It is modular and allows you to pick and chose the features you want to use.

  • It provides a fair number of options to customize its behavior including the ability to work with multiple authenticatable models, override the default routes, and override the default views.

  • It is compatible with the Rails 3 architecture.

  • Supports internationalization.

For more information on Devise see their github page at github.com/plataformatec/devise.

The app is setup in a fairly common configuration with a single User model and all Devise modules in use. The login consists of a user's email address and password. It can be reconfigured to use a username if preferred. Devise's default views are overridden to provide a more finished look. The views are also rewritten using HAML 3, SASS, and the 960 grid system. The default database config uses SQLite 3. The project is setup to use Cucumber and RSpec 2 for the testing frameworks. Cucumber features are provided that test many of Devise's features being used in the app.

Installation

Devise_Base is only compatible with Rails 3. Checkout Devise_Base project with

git clone git@github.com:swanjr/devise_base.git
cd devise_base

If you don't have the bundler gem, install it.

gem install bundler

Install the gems and setup the test database.

bundle install
rake db:create:all
rake db:schema:load
rake db:test:prepare

To verify everything is working as expected run the Cucumber features.

cucumber -P

The project should be ready to use now, for the most part. When you rename your project, however, be sure to rename the module name in all of the configuration files as well. By default the module is called 'DeviseBase'. DeviseBase is referenced in the following files:

  • application.rb

  • environment.rb

  • development.rb

  • production.rb

  • test.rb

  • rspec_generator.rb

  • routes.rb

  • config.rb

Something went wrong with that request. Please try again.