Permalink
Browse files

Merge pull request #1 from LasVegasRubyGroup/see_registrations

looks good, thanks Bob
  • Loading branch information...
JuddL333 committed Apr 23, 2012
2 parents 91c9e11 + 3bf1af3 commit 1eaadd0a657861d0a29856a94a207747bffd00d1
@@ -0,0 +1,3 @@
+# Place all the behaviors and hooks related to the matching controller here.
+# All this logic will automatically be available in application.js.
+# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
@@ -0,0 +1,3 @@
+// Place all the styles related to the admin controller here.
+// They will automatically be included in application.css.
+// You can use Sass (SCSS) here: http://sass-lang.com/
@@ -0,0 +1,10 @@
+class AdminController < ApplicationController
+ http_basic_authenticate_with :name => ENV["ADMIN_NAME"], :password => ENV["ADMIN_PASSWORD"]
+
+ def admin
+ @registered = Registration.all
+ @waitlist = Waitlist.all
+ end
+
+
+end
@@ -0,0 +1,2 @@
+module AdminHelper
+end
@@ -0,0 +1,21 @@
+.row
+ .tencol.lat
+ %h2
+ =@registered.size
+ Registered
+ %ol
+ - @registered.each do |registered|
+ %li
+ = registered.name
+ = registered.email
+
+ %br
+ -if @waitlist.any?
+ %h2
+ =@waitlist.size
+ Wait List
+ %ol
+ - @waitlist.each do |waitlist|
+ %li
+ = waitlist.name
+ = waitlist.email
@@ -27,4 +27,7 @@
# Expands the lines which load the assets
config.assets.debug = true
+
+ ENV["ADMIN_NAME"] = "admin"
+ ENV["ADMIN_PASSWORD"] = "password"
end
View
@@ -14,7 +14,7 @@
match '/refund_policy', :to => 'pages#refund_policy', :as => :refund_policy
match '/hardware_requirements', :to => 'pages#hardware_requirements', :as => :hardware_requirements
-
+ match '/admin', :to => 'admin#admin', :as => :admin
match '/notification_list', :to => 'waitlists#new', :as => :survey
View
@@ -30,11 +30,11 @@
end
create_table "waitlists", :force => true do |t|
- t.string "name"
- t.string "email"
- t.string "phone"
- t.timestamp "created_at"
- t.timestamp "updated_at"
+ t.string "name"
+ t.string "email"
+ t.string "phone"
+ t.datetime "created_at"
+ t.datetime "updated_at"
end
end
@@ -0,0 +1,5 @@
+require 'spec_helper'
+
+describe AdminController do
+
+end
@@ -0,0 +1,15 @@
+require 'spec_helper'
+
+# Specs in this file have access to a helper object that includes
+# the AdminHelper. For example:
+#
+# describe AdminHelper do
+# describe "string concat" do
+# it "concats two strings with spaces" do
+# helper.concat_strings("this","that").should == "this that"
+# end
+# end
+# end
+describe AdminHelper do
+ pending "add some examples to (or delete) #{__FILE__}"
+end

0 comments on commit 1eaadd0

Please sign in to comment.