Sha256: 7ba2fbde2bb9c785a233455696d6ea3ca3f9736fbc4a62c715e49581ce435d48

Contents?: true

Size: 1.75 KB

Versions: 21

Compression:

Stored size: 1.75 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.connect 'channel.html',
        :controller => 'clearance/sessions',
        :action     => 'channel'
      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

21 entries across 21 versions & 1 rubygems

Version Path
fbdoorman-0.9.3 lib/clearance/routes.rb
fbdoorman-0.9.2 lib/clearance/routes.rb
fbdoorman-0.9.1 lib/clearance/routes.rb
fbdoorman-0.9.0 lib/clearance/routes.rb
fbdoorman-0.8.0.98 lib/clearance/routes.rb
fbdoorman-0.8.0.97 lib/clearance/routes.rb
fbdoorman-0.8.0.95 lib/clearance/routes.rb
fbdoorman-0.8.0.94 lib/clearance/routes.rb
fbdoorman-0.8.0.93 lib/clearance/routes.rb
fbdoorman-0.8.0.92 lib/clearance/routes.rb
fbdoorman-0.8.0.91 lib/clearance/routes.rb
fbdoorman-0.8.0.9 lib/clearance/routes.rb
fbdoorman-0.8.0.8 lib/clearance/routes.rb
fbdoorman-0.8.0.7 lib/clearance/routes.rb
fbdoorman-0.8.0.6 lib/clearance/routes.rb
fbdoorman-0.8.0.5 lib/clearance/routes.rb
fbdoorman-0.8.0.4 lib/clearance/routes.rb
fbdoorman-0.8.0.2 lib/clearance/routes.rb
fbdoorman-0.8.0.1 lib/clearance/routes.rb
fbdoorman-0.8.0 lib/clearance/routes.rb