Double Auth Engine
Add double_auth_engine to Gemfile
Run the DoubleAuthEngine install generator
rails g double_auth_engine:install
Migrate your DB and seed it with default seeds (:user and :admin)
Update "email@example.com" within setup_mail.rb to the default address for your application. This address is used for the engine's password reset mailer.
class ActionMailer::Base def from_with_default(input=nil) return from_without_default(input) || "firstname.lastname@example.org" if input.nil? from_without_default(input) end alias_method_chain :from, :default end
Anything within a Rails engine can be overridden by creating the same file within the parent application. For example if you'd like to create your own login form, simply create a
new.html.erb within the
app/views/user_sessions folder in your application. If you need to add additional functionality to one of the models or controllers provided by the engine, create the corresponding file in the appropriate place with your application and then include the associated module from the engine.
class User < ActiveRecord::Base include DoubleAuthEngine::UserMixin end
Readme Driven Development
strike means its done! Add Authlogic Add Password Reset Change Password Update generator with ActionMailer monkey patch Update install generator to add include to ApplicationController Update README for mailer settings Authlogic specs Add Declarative Authorization Declarative Authorization specs Friendly ID
- Mailer specs
- Style views
This project uses Semantic Versioning
All contributions are welcome. Fork repo, make changes, add specs, ensure all specs pass, send a pull request.
Copyright (c) 2011 Kyle Bolton, released under the MIT license