Class: IceauthGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/iceauth/iceauth_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_appObject



4
5
6
7
8
# File 'lib/generators/iceauth/iceauth_generator.rb', line 4

def copy_app
  directory "app"
  directory "spec"
  directory "vendor"
end

#make_routesObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/generators/iceauth/iceauth_generator.rb', line 10

def make_routes
  route "root :to => 'pages#home'"
  
  route "match '/signup',  :to => 'users#new'"
  route "match '/signin',  :to => 'sessions#new'"
  route "match '/signout', :to => 'sessions#destroy'"

  route "match '/contact', :to => 'pages#contact'"
  route "match '/about',   :to => 'pages#about'"
  route "match '/help',    :to => 'pages#help'"  
  
  route "resources :sessions, :only => [:new, :create, :destroy]"
  route "resources :users"
end