public
Description: User authentication plugin (slice) for Merb, with support for ActiveRecord and DataMapper
Homepage: http://www.pragmaquest.com
Clone URL: git://github.com/ctran/merb-auth.git
Search Repo:
name age message
folder .gitignore Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
folder LICENSE Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
folder README Fri Jun 20 10:59:15 -0700 2008 Change instructions to install merb-slices from... [ctran]
folder Rakefile Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
folder app/ Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
folder lib/ Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
folder public/ Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
folder spec/ Tue Jun 10 23:12:56 -0700 2008 Rename auth-slice to merb-auth [ctran]
README
MerbAuth
=========

An user authentication slice for Merb, with support for ActiveRecord and DataMapper.  
See http://github.com/ctran/merb-skel for an example application that uses this slice.

Enhancements are very welcome so please clone at well.  Please send comments/questions to ctran@pragmaquest.com

WARNING: This uses the HEAD version of Merb.

== Installation

> git clone git://github.com/wycats/merb-core.git; cd merb-core; rake install
> git clone git://github.com/wycats/merb-more.git; cd merb-more/merb-slices; rake install

To use activerecord adapter
> gem install activerecord
> gem install merb_activerecord

To use datamapper adapter
> gem install datamapper
> gem install merb_datamapper

=== config/init.rb

# add the slice as a regular dependency
dependency 'merb-auth'

=== config/router.rb

# This will add the following routes /login, /logout and /signup
r.slice(:MerbAuth)

# This will add the following routes /merb-auth/login, /merb-auth/logout and /merb-auth/signup
r.add_slice(:MerbAuth)

# This will add the following routes /user/login, /user/logout and /user/signup
r.add_slice(:MerbAuth, 'user') # same as :path => 'user'

=== Normally you should also run the following rake task:
> rake slices:merb_auth:install

== Customization/Overrides

By default, the user model class MerbAuth::User is aliased to User. 

You can also put your application-level overrides in:

host-app/slices/merb-auth/app - controllers, models, views ...

Templates are located in this order:

1. host-app/slices/merb-auth/app/views/*
2. gems/merb-auth/app/views/*
3. host-app/app/views/*

You can use the host application's layout by configuring the
merb-auth slice in a before_app_loads block:

Merb::Slices.config[:merb_auth] = { :layout => :application }

By default :merb_auth is used. If you need to override
stylesheets or javascripts, just specify your own files in your layout
instead/in addition to the ones supplied (if any) in 
host-app/public/slices/merb-auth.

In any case don't edit those files directly as they may be clobbered any time
rake merb_auth:install is run.