Sha256: 8e545708a3098a339630121e5dca32d1c4ccda8064f248870beec1240cbe848b

Contents?: true

Size: 689 Bytes

Versions: 4

Compression:

Stored size: 689 Bytes

Contents

class IceauthGenerator < Rails::Generators::NamedBase
  source_root File.expand_path('../templates', __FILE__)
  
  def copy_app
    directory "app"
    directory "spec"
    directory "vendor"
  end
  
  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

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iceauth-0.0.4 lib/generators/iceauth/iceauth_generator.rb
iceauth-0.0.3 lib/generators/iceauth/iceauth_generator.rb
iceauth-0.0.2 lib/generators/iceauth/iceauth_generator.rb
iceauth-0.0.1 lib/generators/iceauth/iceauth_generator.rb