Skip to content

Instantly share code, notes, and snippets.

@noel
Created May 7, 2012 23:20
Show Gist options
  • Save noel/2631371 to your computer and use it in GitHub Desktop.
Save noel/2631371 to your computer and use it in GitHub Desktop.
Engine
# lib/ldap_auth/engine.rb
module LdapAuth
class Engine < Rails::Engine
# initialize "agmen_ldap_auth.load_app_instance_data" do |app|
# AmgenLdapAuth.setup do |config|
# config.app_root = app.root
# end
# end
# initialize "agmen_ldap_auth.load_static_assets" do |app|
# app.middleware.use ::ActionDispatch::Static, "#{root}/public"
# end
end
end
Rails.application.routes.draw do
resources :sessions, :only => [:new, :create, :destroy]
match '/signin' => 'ldap_auth/sessions#new', :as => :signin
match '/signout' => 'ldap_auth/sessions#destroy',
:via => :delete, :as => :signout
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment