Sha256: 37cd192f0680aa62e13fb179bb73477410f4686855804c167455d722be3f1a25

Contents?: true

Size: 1.64 KB

Versions: 19

Compression:

Stored size: 1.64 KB

Contents

module Clearance
  class Routes

    # In your application's config/routes.rb, draw Clearance's routes:
    #
    # @example
    #   map.resources :posts
    #   Clearance::Routes.draw(map)
    #
    # If you need to override a Clearance route, invoke your app route
    # earlier in the file so Rails' router short-circuits when it finds
    # your route:
    #
    # @example
    #   map.resources :users, :only => [:new, :create]
    #   Clearance::Routes.draw(map)
    def self.draw(map)
      map.resources :passwords,
        :controller => 'clearance/passwords',
        :only       => [:new, :create]

      map.resource  :session,
        :controller => 'clearance/sessions',
        :only       => [:new, :create, :destroy]

      map.resources :users, :controller => 'clearance/users' do |users|
        users.resource :password,
          :controller => 'clearance/passwords',
          :only       => [:create, :edit, :update]

        users.resource :confirmation,
          :controller => 'clearance/confirmations',
          :only       => [:new, :create]
      end

      map.sign_up  'sign_up',
        :controller => 'clearance/users',
        :action     => 'new'
      map.sign_in  'sign_in',
        :controller => 'clearance/sessions',
        :action     => 'new'
      map.sign_out 'sign_out',
        :controller => 'clearance/sessions',
        :action     => 'destroy',
        :method     => :delete
      map.facebook  'facebook',
          :controller => 'clearance/facebook',
          :action     => 'index'
      map.fbclosed  'fbclosed',
          :controller => 'clearance/facebook',
          :action     => 'closed'          
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fbdoorman-0.7.9 lib/clearance/routes.rb
fbdoorman-0.7.8 lib/clearance/routes.rb
fbdoorman-0.7.7 lib/clearance/routes.rb
fbdoorman-0.7.6 lib/clearance/routes.rb
fbdoorman-0.7.4 lib/clearance/routes.rb
fbdoorman-0.7.3 lib/clearance/routes.rb
fbdoorman-0.7.2 lib/clearance/routes.rb
fbdoorman-0.7.1 lib/clearance/routes.rb
fbdoorman-0.7.0 lib/clearance/routes.rb
fbdoorman-0.1.0 lib/clearance/routes.rb
fbdoorman-0.0.9 lib/clearance/routes.rb
fbdoorman-0.0.8 lib/clearance/routes.rb
fbdoorman-0.0.7 lib/clearance/routes.rb
fbdoorman-0.0.6 lib/clearance/routes.rb
fbdoorman-0.0.5 lib/clearance/routes.rb
fbdoorman-0.0.4 lib/clearance/routes.rb
fbdoorman-0.0.3 lib/clearance/routes.rb
fbdoorman-0.0.2 lib/clearance/routes.rb
fbdoorman-0.0.1 lib/clearance/routes.rb