Sha256: 4d94db673931949971f43b861121114567df76669a856a7ea3c3dffb62dbd789

Contents?: true

Size: 1.8 KB

Versions: 3

Compression:

Stored size: 1.8 KB

Contents

module BlueLightSpecial
  class Routes

    # In your application's config/routes.rb, draw BlueLightSpecial's routes:
    #
    # @example
    #   map.resources :posts
    #   BlueLightSpecial::Routes.draw(map)
    #
    # If you need to override a BlueLightSpecial 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]
    #   BlueLightSpecial::Routes.draw(map)
    def self.draw(map)
      map.resources :passwords,
        :controller => 'blue_light_special/passwords',
        :only       => [:new, :create]

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

      map.resources :users, :controller => 'blue_light_special/users' do |users|
        users.resource :password,
          :controller => 'blue_light_special/passwords',
          :only       => [:create, :edit, :update]
      end
      
      map.resource :impersonation,
        :controller => 'blue_light_special/impersonations',
        :only       => [:create, :destroy]
      map.resources :impersonations,
        :controller => 'blue_light_special/impersonations',
        :only       => :index
        
      map.sign_up    'sign_up',
        :controller   => 'blue_light_special/users',
        :action       => 'new'
      map.sign_in    'sign_in',
        :controller   => 'blue_light_special/sessions',
        :action       => 'new'
      map.fb_connect 'fb_connect',
        :controller   => 'blue_light_special/sessions',
        :action       => 'create'
      map.sign_out   'sign_out',
        :controller   => 'blue_light_special/sessions',
        :action       => 'destroy',
        :method       => :delete
    end

  end
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
blue_light_special-0.2.1 lib/blue_light_special/routes.rb
blue_light_special_heroku_fork-0.2.0.1 lib/blue_light_special/routes.rb
blue_light_special-0.2.0 lib/blue_light_special/routes.rb