<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/models/survey.rb</filename>
    </added>
    <added>
      <filename>app/views/rsvps/survey.html.haml</filename>
    </added>
    <added>
      <filename>db/migrate/20091105022544_create_surveys.rb</filename>
    </added>
    <added>
      <filename>test/fixtures/surveys.yml</filename>
    </added>
    <added>
      <filename>test/unit/survey_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class RsvpsController &lt; ApplicationController
   
-  before_filter :admin_required, :except =&gt; [:create,:clear,:mine,:toggle_reservation]
+  before_filter :admin_required, :except =&gt; [:create,:clear,:mine,:toggle_reservation,:survey]
   
   rescue_from ActiveRecord::RecordNotFound, :with =&gt; :not_found
   
@@ -63,6 +63,16 @@ class RsvpsController &lt; ApplicationController
     render :action =&gt; 'mine'
   end
   
+  def survey
+    find_by_slug
+    @survey = @rsvp.survey || @rsvp.build_survey
+    if request.post?
+      @survey.update_attributes!(params[:survey])
+      flash[:good] = &quot;Thanks for taking the time to fill this out.&quot;
+      redirect_to survey_rsvp_url(:id =&gt; @rsvp.slug)
+    end
+  end
+  
   def send_reminders
     reminded = Rsvp.send_reminders
     reminded_notice = reminded.map { |rsvp| &quot;#{rsvp.name} at #{rsvp.email}&quot; }</diff>
      <filename>app/controllers/rsvps_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -25,5 +25,14 @@ module RsvpsHelper
     end
   end
   
+  def survey_question_field(attribute)
+    case attribute.to_s.last
+    when 't'
+      text_area_tag &quot;survey[#{attribute}]&quot;, @survey.send(attribute), :class =&gt; 'w80p h140 mt5 p10', :style =&gt; 'color:#fff; background-color:#333; font-size:18px;'
+    when 'b'
+      select_tag &quot;survey[#{attribute}]&quot;, options_for_select([['',''],['Yes','true'],['No','false']],@survey.send(attribute).nil? ? '' : @survey.send(&quot;#{attribute}?&quot;).to_s), :style =&gt; 'font-size:18px;'
+    end
+  end
+  
   
 end</diff>
      <filename>app/helpers/rsvps_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,6 +8,8 @@ class Rsvp &lt; ActiveRecord::Base
   named_scope :reserved, :conditions =&gt; {:reserved =&gt; true}
   named_scope :not_reserved, :conditions =&gt; {:reserved =&gt; false}
   
+  has_one :survey
+  
   validates_presence_of :name, :email, :slug
   
   serialize :attendee_names, Array</diff>
      <filename>app/models/rsvp.rb</filename>
    </modified>
    <modified>
      <diff>@@ -128,9 +128,9 @@
             = image_tag '/images/content/hrtc_logo.png', :class =&gt; 'nobor', :alt =&gt; 'Hampton Roads Technology Council'
           &lt;br/&gt;
           - link_to 'http://www.viget.com/' do
-            = image_tag 'content/viget_labs_logo.png', :width =&gt; 120, :class =&gt; '', :alt =&gt; 'Viget Labs Logo'
+            = image_tag 'content/viget_labs_logo.png', :width =&gt; 120, :class =&gt; 'nobor', :alt =&gt; 'Viget Labs Logo'
           - link_to 'http://mobelux.com/' do
-            = image_tag 'content/mobelux_logo.png', :width =&gt; 130, :class =&gt; '', :alt =&gt; 'Mobelux Logo'
+            = image_tag 'content/mobelux_logo.png', :width =&gt; 130, :class =&gt; 'nobor', :alt =&gt; 'Mobelux Logo'
 
     #footer
       = bottom_nav</diff>
      <filename>app/views/layouts/application.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -25,6 +25,7 @@
     %th Company
     %th Attendees
     %th Reserved
+    %th Survey
     %th Actions
   - @rsvps.each_with_index do |r,i|
     %tr{:class =&gt; cycle('even','odd')}
@@ -33,6 +34,7 @@
       %td= r.company
       %td= r.attendees
       %td= image_tag('/images/layout/good.png') if r.reserved?
+      %td= link_to(image_tag('/images/layout/good.png'),survey_rsvp_path(r)) if r.survey.present?
       %td{:class =&gt; 'nowrap'}
         = link_to '[Edit]', edit_rsvp_path(r)
         - if Rails.env.development?</diff>
      <filename>app/views/rsvps/index.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,8 @@ ActionController::Routing::Routes.draw do |map|
                 :member =&gt; {
                   :clear =&gt; :put, 
                   :mine  =&gt; [:get,:put],
-                  :toggle_reservation =&gt; :put
+                  :toggle_reservation =&gt; :put,
+                  :survey =&gt; [:get,:post]
                 }
   
   map.site    ':page',  :controller =&gt; 'site',  :action =&gt; 'show'</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -9,7 +9,7 @@
 #
 # It's strongly recommended to check this file into your version control system.
 
-ActiveRecord::Schema.define(:version =&gt; 20090930000238) do
+ActiveRecord::Schema.define(:version =&gt; 20091105022544) do
 
   create_table &quot;rsvps&quot;, :force =&gt; true do |t|
     t.string   &quot;name&quot;
@@ -23,6 +23,18 @@ ActiveRecord::Schema.define(:version =&gt; 20090930000238) do
     t.string   &quot;attendee_names&quot;, :limit =&gt; 1024
   end
 
+  create_table &quot;surveys&quot;, :force =&gt; true do |t|
+    t.integer  &quot;rsvp_id&quot;
+    t.text     &quot;a1t&quot;
+    t.text     &quot;a2t&quot;
+    t.text     &quot;a3t&quot;
+    t.text     &quot;a4t&quot;
+    t.boolean  &quot;a1b&quot;
+    t.boolean  &quot;a2b&quot;
+    t.datetime &quot;created_at&quot;
+    t.datetime &quot;updated_at&quot;
+  end
+
   create_table &quot;users&quot;, :force =&gt; true do |t|
     t.string   &quot;email&quot;
     t.string   &quot;password&quot;</diff>
      <filename>db/schema.rb</filename>
    </modified>
    <modified>
      <diff>@@ -12,6 +12,7 @@
 .w100p           { width:100% !important; }
 .w99p            { width:98% !important; }
 .w98p            { width:98% !important; }
+.w80p            { width:80% !important; }
                  
 .floatr          { float:right; display:inline; }
 .floatl          { float:left; display:inline; }</diff>
      <filename>public/stylesheets/utility.css</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ee476af21a6d200f99c5ca9e906178f597292fe3</id>
    </parent>
  </parents>
  <author>
    <name>Ken Collins</name>
    <email>ken@metaskills.net</email>
  </author>
  <url>http://github.com/metaskills/757studio/commit/f2c821e0c05d1a128df0eb0ebfecdb91274ef7b0</url>
  <id>f2c821e0c05d1a128df0eb0ebfecdb91274ef7b0</id>
  <committed-date>2009-11-04T20:13:18-08:00</committed-date>
  <authored-date>2009-11-04T20:13:18-08:00</authored-date>
  <message>Add a basic survey form.</message>
  <tree>43d2309f31d31d47022ec99bb163096691e55046</tree>
  <committer>
    <name>Ken Collins</name>
    <email>ken@metaskills.net</email>
  </committer>
</commit>
