diff options
| -rw-r--r-- | app/controllers/sign_ups_controller.rb | 5 | ||||
| -rw-r--r-- | app/models/sign_up.rb | 2 | ||||
| -rw-r--r-- | app/views/sign_ups/new.html.erb | 1 | ||||
| -rw-r--r-- | config/routes.rb | 52 | ||||
| -rw-r--r-- | db/migrate/20130719165834_create_sign_ups.rb | 9 | ||||
| -rw-r--r-- | db/schema.rb | 9 | ||||
| -rw-r--r-- | spec/models/sign_up_spec.rb | 5 |
7 files changed, 30 insertions, 53 deletions
diff --git a/app/controllers/sign_ups_controller.rb b/app/controllers/sign_ups_controller.rb new file mode 100644 index 0000000..6ee51af --- /dev/null +++ b/app/controllers/sign_ups_controller.rb @@ -0,0 +1,5 @@ +class SignUpsController < ApplicationController + def new + @sign_up = SignUp.new + end +end diff --git a/app/models/sign_up.rb b/app/models/sign_up.rb new file mode 100644 index 0000000..a3c400e --- /dev/null +++ b/app/models/sign_up.rb @@ -0,0 +1,2 @@ +class SignUp < ActiveRecord::Base +end diff --git a/app/views/sign_ups/new.html.erb b/app/views/sign_ups/new.html.erb new file mode 100644 index 0000000..08b8f9c --- /dev/null +++ b/app/views/sign_ups/new.html.erb @@ -0,0 +1 @@ +New Signup here diff --git a/config/routes.rb b/config/routes.rb index 3344067..72d6f0e 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,54 +3,6 @@ Parley::Application.routes.draw do # See how all your routes lay out with "rake routes". # You can have the root of your site routed with "root" - root 'welcome#index' - - # Example of regular route: - # get 'products/:id' => 'catalog#view' - - # Example of named route that can be invoked with purchase_url(id: product.id) - # get 'products/:id/purchase' => 'catalog#purchase', as: :purchase - - # Example resource route (maps HTTP verbs to controller actions automatically): - # resources :products - - # Example resource route with options: - # resources :products do - # member do - # get 'short' - # post 'toggle' - # end - # - # collection do - # get 'sold' - # end - # end - - # Example resource route with sub-resources: - # resources :products do - # resources :comments, :sales - # resource :seller - # end - - # Example resource route with more complex sub-resources: - # resources :products do - # resources :comments - # resources :sales do - # get 'recent', on: :collection - # end - # end - - # Example resource route with concerns: - # concern :toggleable do - # post 'toggle' - # end - # resources :posts, concerns: :toggleable - # resources :photos, concerns: :toggleable - - # Example resource route within a namespace: - # namespace :admin do - # # Directs /admin/products/* to Admin::ProductsController - # # (app/controllers/admin/products_controller.rb) - # resources :products - # end + #root 'welcome#index' + root :to => 'sign_ups#new' end diff --git a/db/migrate/20130719165834_create_sign_ups.rb b/db/migrate/20130719165834_create_sign_ups.rb new file mode 100644 index 0000000..bb874f2 --- /dev/null +++ b/db/migrate/20130719165834_create_sign_ups.rb @@ -0,0 +1,9 @@ +class CreateSignUps < ActiveRecord::Migration + def change + create_table :sign_ups do |t| + t.string :email + + t.timestamps + end + end +end diff --git a/db/schema.rb b/db/schema.rb index ea89ed5..19cb362 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,9 +11,12 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 0) do +ActiveRecord::Schema.define(version: 20130719165834) do - # These are extensions that must be enabled in order to support this database - enable_extension "plpgsql" + create_table "sign_ups", force: true do |t| + t.string "email" + t.datetime "created_at" + t.datetime "updated_at" + end end diff --git a/spec/models/sign_up_spec.rb b/spec/models/sign_up_spec.rb new file mode 100644 index 0000000..3566ef5 --- /dev/null +++ b/spec/models/sign_up_spec.rb @@ -0,0 +1,5 @@ +require 'spec_helper' + +describe SignUp do + pending "add some examples to (or delete) #{__FILE__}" +end |
