<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -81,12 +81,12 @@ class ApplicationController &lt; ActionController::Base
   end
 
   def store_comment_for_non_logged_in_user
-    title, body, news_item_id = params_for_comment(params)
-    if title &amp;&amp; body &amp;&amp; news_item_id
-      session[:return_to] = url_for_news_item(NewsItem.find_by_id(params[:news_item_id]))
+    title, body, commentable_id = params_for_comment(params)
+    if title &amp;&amp; body &amp;&amp; commentable_id
+      session[:return_to] = url_for_news_item(NewsItem.find_by_id(params[:commentable_id]))
       session[:title] = title
       session[:body] = body
-      session[:news_item_id] = news_item_id
+      session[:news_item_id] = commentable_id
     end
   end
 
@@ -94,9 +94,9 @@ class ApplicationController &lt; ActionController::Base
     comment_params.symbolize_keys!
     if comment_params[:comment]
       comment_params[:comment].symbolize_keys!
-      [comment_params[:comment][:title], comment_params[:comment][:body], comment_params[:pitch_id]]
+      [comment_params[:comment][:title], comment_params[:comment][:body], comment_params[:commentable_id]]
     else
-      [comment_params[:title], comment_params[:body], comment_params[:news_item_id]]
+      [comment_params[:title], comment_params[:body], comment_params[:commentable_id]]
     end
   end
 
@@ -108,4 +108,26 @@ class ApplicationController &lt; ActionController::Base
       session[:body] = nil
     end
   end
+
+  layout :application_except_xhr
+  def application_except_xhr
+    request.xhr? ? false : &quot;application&quot;
+  end
+
+  def set_ajax_flash(type, message)
+    if request.xhr?
+      headers[&quot;X-Flash-#{type.to_s.capitalize}&quot;] = message
+    else
+      flash[type] = message
+    end
+  end
+
+  def flash_and_redirect(type, message, url = root_path)
+    set_ajax_flash(type, message)
+    if request.xhr?
+      render :nothing =&gt; true
+    else
+      redirect_to url
+    end
+  end
 end</diff>
      <filename>app/controllers/application_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class CommentsController &lt; ApplicationController
   skip_before_filter :verify_authenticity_token
-  before_filter :login_required, :except =&gt; :create
+  before_filter :login_required
 
   resources_controller_for :comments, :only =&gt; [:create, :index]
 </diff>
      <filename>app/controllers/comments_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,9 @@ class Myspot::DonationsController &lt; ApplicationController
   response_for :create do |format|
     if resource_saved?
       update_balance_cookie
-      format.js { render :text =&gt; &quot;document.location = '#{edit_myspot_donations_amounts_url}';&quot; }
       format.html { redirect_to edit_myspot_donations_amounts_path }
     else
-      format.js { render :action =&gt; &quot;new&quot;}
+      format.html { render :text =&gt; &quot;TODO&quot; }
     end
   end
 </diff>
      <filename>app/controllers/myspot/donations_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,9 @@ class PledgesController &lt; ApplicationController
 
   response_for :create do |format|
     if resource_saved?
-      format.js { render :text =&gt; &quot;document.location = '#{search_news_items_path(:news_item_type=&gt;'tips', :sort_by=&gt;'desc')}';&quot; }
       format.html { redirect_to search_news_items_path(:news_item_type=&gt;'tips', :sort_by=&gt;'desc') }
     else
-      format.js { render :action =&gt; &quot;new&quot;}
+      format.html { render :text =&gt; resource.errors[:base] }
     end
   end
 </diff>
      <filename>app/controllers/pledges_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,9 +4,8 @@ class SessionsController &lt; ApplicationController
     store_news_item_for_non_logged_in_user
     store_comment_for_non_logged_in_user
     store_location(params[:return_to] || root_path)
-    respond_to do |format|
-      format.html
-      format.js { render :partial =&gt; &quot;header_form&quot;, :layout =&gt; false }
+    if request.xhr?
+      render :partial =&gt; &quot;header_form&quot;
     end
   end
 
@@ -18,11 +17,20 @@ class SessionsController &lt; ApplicationController
       update_balance_cookie
       handle_first_donation_for_non_logged_in_user
       handle_first_pledge_for_non_logged_in_user
-      handle_comment_for_non_logged_in_user
-      redirect_back_or_default('/')
+
+      if request.xhr?
+        render :nothing =&gt; true
+      else
+        redirect_back_or_default('/')
+      end
     else
       @user = User.new
-      render :action =&gt; 'new'
+      if request.xhr?
+        set_ajax_flash(:error, 'Invalid email or password.')
+        render :status =&gt; :unprocessable_entity, :nothing =&gt; true
+      else
+        render 'new'
+      end
     end
   end
 </diff>
      <filename>app/controllers/sessions_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,13 +10,19 @@ class UsersController &lt; ApplicationController
     @user = User.new(params[:user])
     if @user.save
       unless @user.organization?
-        flash[:success] = 'Click the link in the email we just sent to you to finish creating your account!'
+        self.current_user = @user
+        create_current_login_cookie
+        update_balance_cookie
+        flash_and_redirect(:success, 'Click the link in the email we just sent to you to finish creating your account!', root_path)
       else
-        flash[:success] = &quot;Your account will be reviewed prior to approval. We'll get back to you as soon as possible.&quot;
+        flash_and_redirect(:success, &quot;Your account will be reviewed prior to approval. We'll get back to you as soon as possible.&quot;, root_path)
       end
-      redirect_to root_path
     else
-      render :action =&gt; 'new'
+      if request.xhr?
+        render :partial =&gt; 'sessions/header_form', :status =&gt; :unprocessable_entity
+      else
+        render :action =&gt; 'new', :status =&gt; :unprocessable_entity
+      end
     end
   end
 </diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,4 @@
 .row
   = f.hidden_field :commentable_id
   = f.hidden_field :commentable_type
-  - if logged_in?
-    = f.submit 'Post Comment'
-  - else
-    = button_to_function &quot;Post Comment&quot;, &quot;submitCommentToLogin();&quot;, :rel =&gt; &quot;facebox&quot;
+  = f.submit 'Post Comment'</diff>
      <filename>app/views/comments/_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,4 @@
-- remote_form_for Donation.new(:pitch =&gt; news_item, :amount =&gt; Donation::DEFAULT_AMOUNT), :url =&gt; myspot_donations_path, :html =&gt; {:id =&gt; &quot;new_donation_#{news_item.id}&quot;} do |f|
-  = f.hidden_field :amount
+- form_for Donation.new(:pitch =&gt; news_item, :amount =&gt; Donation::DEFAULT_AMOUNT), :url =&gt; myspot_donations_path, :html =&gt; {:id =&gt; &quot;new_donation_#{news_item.id}&quot;, :class =&gt; &quot;auth&quot;} do |f|
+  = f.hidden_field :amount, :id =&gt; &quot;donation_default_amount&quot;
   = f.hidden_field :pitch_id
-  - if logged_in?
-    = image_submit_tag &quot;donate_default.png&quot;, :alt =&gt; &quot;Donate #{Donation::DEFAULT_AMOUNT}&quot;, :title =&gt; &quot;Donate #{Donation::DEFAULT_AMOUNT}&quot;
-  - else
-    = link_to image_tag(&quot;donate_default.png&quot;), new_session_path(:return_to =&gt; edit_myspot_donations_amounts_path, :donation_amount =&gt; Donation::DEFAULT_AMOUNT, :news_item_id =&gt; news_item.id), :rel =&gt; &quot;facebox&quot;, :title =&gt; &quot;Donate #{Donation::DEFAULT_AMOUNT}&quot;
+  = image_submit_tag &quot;donate_default.png&quot;, :alt =&gt; &quot;Donate #{Donation::DEFAULT_AMOUNT}&quot;, :title =&gt; &quot;Donate #{Donation::DEFAULT_AMOUNT}&quot;</diff>
      <filename>app/views/donations/_donate_default_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,13 +1,12 @@
-- remote_form_for Donation.new(:pitch =&gt; news_item), :url =&gt; myspot_donations_path, :html =&gt; {:id =&gt; &quot;custom_donation_#{news_item.id}&quot;} do |f|
-  - if current_user &amp;&amp; current_user.has_donated_to?(news_item)
-    .float_left= f.text_field :amount, :value =&gt; number_to_currency(current_user.max_donation_for(news_item), :unit =&gt; '')
-  - else
-    .float_left= f.text_field :amount, :value =&gt; number_to_currency(news_item.default_donation_amount, :unit =&gt; '')
+- form_for Donation.new(:pitch =&gt; news_item), :url =&gt; myspot_donations_path, :html =&gt; {:id =&gt; &quot;custom_donation_#{news_item.id}&quot;, :class =&gt; &quot;auth&quot;} do |f|
+  .float_left
+    = f.label :amount, &quot;Donate other amount&quot;, :class =&gt; &quot;hide&quot;
+    - if current_user &amp;&amp; current_user.has_donated_to?(news_item)
+      = f.text_field :amount, :value =&gt; number_to_currency(current_user.max_donation_for(news_item), :unit =&gt; '')
+    - else
+      = f.text_field :amount, :value =&gt; number_to_currency(news_item.default_donation_amount, :unit =&gt; '')
   = f.hidden_field :pitch_id
   .float_right
-    - if logged_in?
-      = image_submit_tag(&quot;donate.png&quot;, :title =&gt; &quot;Donate another amount&quot;)
-    - else
-      = link_to_function image_tag(&quot;donate.png&quot;), &quot;submitToLogin('custom_donation_#{news_item.id}')&quot;, :rel =&gt; 'facebox', :title =&gt; &quot;Donate another amount&quot;
+    = image_submit_tag(&quot;donate.png&quot;, :title =&gt; &quot;Donate another amount&quot;, :alt =&gt; &quot;Donate another amount&quot;)
 
   .clear</diff>
      <filename>app/views/donations/_donate_variable_amount_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -31,6 +31,7 @@
   = javascript_include_tag 'jcarousellite_1.0.1'
   = javascript_include_tag 'jquery.form'
   = javascript_include_tag 'application'
+  = javascript_include_tag 'auth'
 
   = stylesheet_link_tag 'facebox'
   = javascript_include_tag 'facebox'</diff>
      <filename>app/views/layouts/_head.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -12,7 +12,7 @@
     %li
       = link_to &quot;Register&quot;, new_session_path, :rel =&gt; 'facebox'
     %li.no-pipe
-      = link_to &quot;Login&quot;, new_session_path, :rel =&gt; 'facebox'
+      = link_to &quot;Login&quot;, new_session_path, :rel =&gt; 'facebox', :id =&gt; &quot;sign_in&quot;
 
 .slogan
   %span.pink Community</diff>
      <filename>app/views/layouts/_user_header.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -20,15 +20,14 @@
             - else
               = network.display_name
         - if yield(:error)
-          .flash.error
+          .error
             %span.dismiss= link_to image_tag('close_square.png'), @close_flash_link || '' # empty string means self
             %p= yield(:error)
-        - if flash.any?
-          .flash
-            - flash.each do |key, value|
-              %div{ :id =&gt; &quot;flash_#{key}&quot;, :class =&gt; key }
-                %span.dismiss= link_to image_tag('close_square.png'), @close_flash_link || '' # empty string means self
-                %p.flash_note= value
+        #flash
+          - flash.each do |key, value|
+            %div{:class =&gt; key }
+              %span.dismiss= link_to image_tag('close_square.png'), @close_flash_link || '' # empty string means self
+              %p= value
         = yield
         .clear
     #footer</diff>
      <filename>app/views/layouts/application.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -53,7 +53,7 @@
       = render :partial =&gt; 'shared/comment', :collection =&gt; @pitch.comments
     %h3 Post A Comment
     .double_content_border
-    - form_for [@pitch, Comment.new(:commentable =&gt; @pitch)], :html =&gt; { :id =&gt; 'comments_form' } do |f|
+    - form_for [@pitch, Comment.new(:commentable =&gt; @pitch)], :html =&gt; { :id =&gt; 'comments_form', :class =&gt; &quot;auth&quot; } do |f|
       = render :partial =&gt; 'comments/form', :locals =&gt; {:f =&gt; f}
 
   .span-220.column_v.box_white</diff>
      <filename>app/views/pitches/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -3,22 +3,18 @@
 - else
   %div{:id =&gt; &quot;inline_pledge_form_#{news_item.id}&quot;}
     %div{:id =&gt; &quot;pledge_button_#{news_item.id}&quot;}
-      - remote_form_for Pledge.new(:tip =&gt; news_item, :amount =&gt; Donation::DEFAULT_AMOUNT) do |f|
-        = f.hidden_field :amount
-        = f.hidden_field :tip_id
-        - if logged_in?
+      - form_for Pledge.new(:tip =&gt; news_item, :amount =&gt; Donation::DEFAULT_AMOUNT), :html =&gt; {:class =&gt; 'auth'} do |f|
+        %div
+          = f.hidden_field :amount
+          = f.hidden_field :tip_id
           = image_submit_tag(&quot;pledge_default.png&quot;)
-        - else
-          = link_to image_tag(&quot;pledge_default.png&quot;), new_session_path(:return_to =&gt; myspot_pledges_path, :pledge_amount =&gt; Donation::DEFAULT_AMOUNT, :news_item_id =&gt; news_item.id), :rel =&gt; &quot;facebox&quot;, :title =&gt; &quot;Pledge #{Donation::DEFAULT_AMOUNT}&quot;
 
     %div.inline_pledge{:style =&gt; &quot;display:none&quot;, :id =&gt; &quot;pledge_custom_#{news_item.id}&quot;}
-      - remote_form_for Pledge.new(:tip =&gt; news_item), :html =&gt; { :id =&gt; &quot;custom_pledge_#{news_item.id}&quot; } do |f|
-        .float_left= f.text_field :amount
-        = f.hidden_field :tip_id
-        - if logged_in?
-          .float_right= image_submit_tag(&quot;pledge.png&quot;)
-        - else
-          .float_right= link_to_function image_tag(&quot;pledge.png&quot;), &quot;submitToLogin('custom_pledge_#{news_item.id}', 'pledge')&quot;, :rel =&gt; &quot;facebox&quot;, :title =&gt; &quot;Pledge #{Donation::DEFAULT_AMOUNT}&quot;
+      - form_for Pledge.new(:tip =&gt; news_item), :html =&gt; { :id =&gt; &quot;custom_pledge_#{news_item.id}&quot;, :class =&gt; 'auth' } do |f|
+        .float_left
+          = f.hidden_field :tip_id
+          = f.text_field :amount
+        .float_right= image_submit_tag(&quot;pledge.png&quot;)
         .clear
     .small.uppcased_button_text
       = link_to_function &quot;OR PLEDGE ANOTHER AMOUNT &amp;raquo;&quot;, %{jQuery(&quot;#pledge_button_#{news_item.id}, #pledge_custom_#{news_item.id}&quot;).toggle();}</diff>
      <filename>app/views/pledges/_button.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 .login-boxer.span-13
-  .span-12
+  .span-12.login
     - form_tag session_url do
       %h3 Thanks for joining us!
       .double_content_border
@@ -8,6 +8,6 @@
       .double_content_border
       %input{:type =&gt; 'image', :src=&gt;'/images/login.png', :alt =&gt; &quot;Login&quot;, :class =&gt; &quot;float-right&quot;}
 
-  .span-12
+  .span-12.register
     = render :partial =&gt; &quot;users/form&quot;
 .clear</diff>
      <filename>app/views/sessions/_header_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -27,7 +27,7 @@
         = render :partial =&gt; 'shared/comment', :collection =&gt; @story.comments
       %h3 Post A Comment
       .double_content_border
-      - form_for [@story, Comment.new] do |f|
+      - form_for [@story, Comment.new], :html =&gt; {:class =&gt; 'auth'} do |f|
         = render :partial =&gt; 'comments/form', :locals =&gt; {:f =&gt; f}
   .span-220.column_v.box_white
     %h3.description</diff>
      <filename>app/views/stories/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -24,7 +24,7 @@
       = render :partial =&gt; 'shared/comment', :collection =&gt; @tip.comments
     %h3 Post A Comment
     .double_content_border
-    - form_for [@tip, Comment.new] do |f|
+    - form_for [@tip, Comment.new], :html =&gt; {:class =&gt; 'auth'} do |f|
       = render :partial =&gt; 'comments/form', :locals =&gt; {:f =&gt; f}
   .span-220.column_v.box_white
     .centered= render :partial =&gt; &quot;pledges/button&quot;, :locals =&gt; { :news_item =&gt; @tip }</diff>
      <filename>app/views/tips/show.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 - if @user &amp;&amp; @user.errors.any?
-  - content_for :error do
+  .error
     = error_messages_for :user
 
 %h3
@@ -9,7 +9,7 @@
   .float-right
     = link_to &quot;Resend Activation Email&quot;, activation_email_user_path, :class =&gt; &quot;forgot_password&quot;
 .double_content_border
-- form_for(:user, @user, :url =&gt; user_path) do |f|
+- form_for(:user, @user, :url =&gt; user_path, :html =&gt; {:class =&gt; 'register'}) do |f|
   .register
     %div
       = f.label :first_name, &quot;Your First Name&quot;</diff>
      <filename>app/views/users/_form.html.haml</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,6 @@ Feature: Creating a pitch
     Then I should be on the show pitch page
     And I should see &quot;Pitch was successfully created&quot;
     And I should see &quot;Pitch Headline&quot;
-    And I should see a form with class &quot;new_donation&quot;
     And I should see an &quot;Edit This Pitch&quot; titled link
 
   Scenario: A reporter creates an invalid pitch</diff>
      <filename>features/create_a_pitch.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,39 +1,18 @@
 Feature: Donating
 
-  Scenario: New User Donating 20
-    Given A pitch exists
+  Scenario: Existing User Donating 20
+    Given a pitch
+    And I am logged in as a citizen
     And I view the current pitch page
-    And I follow &quot;Donate 20&quot;
-    And I follow &quot;New USERS: REGISTER HERE&quot;
-    And I fill in &quot;Your First Name&quot; with &quot;My First Name&quot;
-    And I fill in &quot;Your Last Name&quot; with &quot;My Last Name&quot;
-    And I fill in &quot;Password&quot; with &quot;password&quot;
-    And I fill in &quot;Confirm Password&quot; with &quot;password&quot;
-    And I fill in &quot;Your E-mail Address&quot; with &quot;me@example.com&quot;
-    And I select &quot;Community Member&quot; from &quot;user[type]&quot;
-    And I check &quot;user_terms_of_service&quot;
-    And I press &quot;Register&quot;
-    And I should see &quot;Click the link in the email we just sent to you to finish creating your account!&quot;
-    When I activate my account with email &quot;me@example.com&quot;
+    When I press &quot;Donate 20&quot;
     Then I should be on the edit myspot::donation_amounts page
     And I should see &quot;20.00&quot; inside a text field
 
-# TODO: write this test in culerity if that ever is setup for this project
-#  Scenario: New User Donating Variable Amount
-#    Given A pitch exists
-#    And I view the current pitch page
-#    And I follow &quot;Donate another amount&quot;
-#    And I follow &quot;REGISTER HERE&quot;
-#    And I fill in &quot;Your First Name&quot; with &quot;My First Name&quot;
-#    And I fill in &quot;Your Last Name&quot; with &quot;My Last Name&quot;
-#    And I fill in &quot;Password&quot; with &quot;password&quot;
-#    And I fill in &quot;Confirm Password&quot; with &quot;password&quot;
-#    And I fill in &quot;Your E-mail Address&quot; with &quot;me@example.com&quot;
-#    And I choose &quot;Community Member&quot;
-#    And I check &quot;user_terms_of_service&quot;
-#    And I press &quot;Register&quot;
-#    And I should see &quot;Click the link in the email we just sent to you to finish creating your account!&quot;
-#    When I activate my account with email &quot;me@example.com&quot;
-#    Then I should be on the edit myspot::donation_amounts page
-#    And I should see &quot;200.00&quot; inside a text field
-#
+  Scenario: Existing User Donating Variable Amount
+    Given a pitch
+    And I am logged in as a citizen
+    And I view the current pitch page
+    And I fill in &quot;Donate other amount&quot; with &quot;50.00&quot;
+    When I press &quot;Donate another amount&quot;
+    Then I should be on the edit myspot::donation_amounts page
+    And I should see &quot;50.00&quot; inside a text field</diff>
      <filename>features/donating.feature</filename>
    </modified>
    <modified>
      <diff>@@ -10,7 +10,7 @@ Given /^I have created a &quot;(.*)&quot;$/ do |model_name|
   instance_variable_set(&quot;@#{model_name}&quot;, Factory(model_name.to_sym, :user =&gt; @current_user))
 end
 
-Given /^A (\w+) exists$/ do |model_name| 
+Given /^[Aa] (\w+)(?: exists)?$/ do |model_name|
   instance = Factory(model_name.to_sym)
   instance_variable_set(&quot;@#{model_name}&quot;, instance)
 end</diff>
      <filename>features/step_definitions/spotus_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -16,6 +16,7 @@ jQuery(document).ready(function($){
     btnPrev: &quot;.prev&quot;,
     visible: 1
   });
+
 });
 
 jQuery(&quot;a&quot;).click(function($){
@@ -106,4 +107,12 @@ function load_categories(id) {
     });
 }
 
-    
+jQuery(document).ajaxComplete(function(options, r) {
+    var notice;
+    var dismiss = &quot;&lt;span class=\&quot;dismiss\&quot;&gt;&lt;a href=\&quot;\&quot;&gt;&lt;img src=\&quot;/images/close_square.png\&quot; alt=\&quot;Dismiss\&quot; /&gt;&lt;/span&gt;&quot;;
+    jQuery.each([&quot;Success&quot;, &quot;Notice&quot;, &quot;Error&quot;], function() {
+      if(notice = r.getResponseHeader(&quot;X-Flash-&quot; + this)) {
+        jQuery(&quot;#flash&quot;).append(jQuery(&quot;&lt;div/&gt;&quot;).addClass(this.toLowerCase()).html(dismiss + &quot;&lt;p&gt;&quot; + notice + &quot;&lt;/p&gt;&quot;));
+      }
+    });
+});</diff>
      <filename>public/javascripts/application.js</filename>
    </modified>
    <modified>
      <diff>@@ -417,7 +417,7 @@ body {
   min-height: 80px;
 }
 
-.error p.flash_note, .success p.flash_note, .notice p.flash_note {
+#flash p {
   padding: 20px 0 0 0;
 }
 .success, .notice {</diff>
      <filename>public/stylesheets/screen_spotus.css</filename>
    </modified>
    <modified>
      <diff>@@ -62,7 +62,7 @@ describe ApplicationController do
 
   describe &quot;#store_comment_for_non_logged_in_user&quot; do
     before do
-      controller.stub!(:params).and_return({&quot;action&quot;=&gt;&quot;create&quot;, &quot;controller&quot;=&gt;&quot;comments&quot;, &quot;pitch_id&quot;=&gt;&quot;1&quot;, &quot;comment&quot;=&gt;{&quot;body&quot;=&gt;&quot;bar&quot;, &quot;title&quot;=&gt;&quot;foo&quot;}})
+      controller.stub!(:params).and_return({&quot;action&quot;=&gt;&quot;create&quot;, &quot;controller&quot;=&gt;&quot;comments&quot;, &quot;commentable_id&quot;=&gt;&quot;1&quot;, &quot;comment&quot;=&gt;{&quot;body&quot;=&gt;&quot;bar&quot;, &quot;title&quot;=&gt;&quot;foo&quot;}})
     end
     it &quot;saves the comment title and body to session&quot; do
       controller.send(:store_comment_for_non_logged_in_user)
@@ -82,8 +82,8 @@ describe ApplicationController do
 
   describe &quot;#params_for_comment&quot; do
     before do
-      @html_params = {&quot;action&quot;=&gt;&quot;create&quot;, &quot;controller&quot;=&gt;&quot;comments&quot;, &quot;pitch_id&quot;=&gt;&quot;1&quot;, &quot;comment&quot;=&gt;{&quot;body&quot;=&gt;&quot;bar&quot;, &quot;title&quot;=&gt;&quot;foo&quot;}}
-      @js_params = {:title =&gt; &quot;foo&quot;, :body =&gt; &quot;bar&quot;, :news_item_id =&gt; &quot;1&quot;}
+      @html_params = {&quot;action&quot;=&gt;&quot;create&quot;, &quot;controller&quot;=&gt;&quot;comments&quot;, &quot;commentable_id&quot;=&gt;&quot;1&quot;, &quot;comment&quot;=&gt;{&quot;body&quot;=&gt;&quot;bar&quot;, &quot;title&quot;=&gt;&quot;foo&quot;}}
+      @js_params = {:title =&gt; &quot;foo&quot;, :body =&gt; &quot;bar&quot;, :commentable_id =&gt; &quot;1&quot;}
     end
 
     it &quot;returns title, body and news_item_id for html params&quot; do</diff>
      <filename>spec/controllers/application_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -55,7 +55,7 @@ describe Myspot::DonationsController do
     end
 
     def do_create
-      xhr :post, :create, :donation =&gt; {:pitch_id =&gt; @pitch.id, :amount =&gt; 25}
+      post :create, :donation =&gt; {:pitch_id =&gt; @pitch.id, :amount =&gt; 25}
     end
   end
 </diff>
      <filename>spec/controllers/myspot/donations_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -15,7 +15,6 @@ describe UsersController do
     lambda do
       do_create(:email =&gt; nil)
       assigns[:user].errors.on(:email).should_not be_nil
-      response.should be_success
     end.should_not change(User, :count)
   end
 
@@ -25,8 +24,8 @@ describe UsersController do
       post :create, :user =&gt; {}
     end
 
-    it &quot;should be successful&quot; do
-      response.should be_success
+    it &quot;should render the new template&quot; do
+      response.should render_template('users/new.html.haml')
     end
 
     it &quot;should have errors on the user&quot; do</diff>
      <filename>spec/controllers/users_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -68,7 +68,7 @@ describe 'users/new' do
     end
 
     it &quot;should display an error message&quot; do
-      template.should_receive(:content_for).once.with(:error)
+      template.should_receive(:error_messages_for).with(:user)
       do_render
     end
   end</diff>
      <filename>spec/views/users/new.html.haml_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9c2d6aa42a9739f4ad286e7e5ab2c8394228611e</id>
    </parent>
  </parents>
  <author>
    <name>Tim Pope and Veez (Matt Remsik)</name>
    <email>dev+tpope+veez@hashrocket.com</email>
  </author>
  <url>http://github.com/spot-us/spot-us/commit/abf04c077a1f1589b2d0025bd90aea8a9fce4310</url>
  <id>abf04c077a1f1589b2d0025bd90aea8a9fce4310</id>
  <committed-date>2009-04-20T14:37:36-07:00</committed-date>
  <authored-date>2009-04-20T14:37:36-07:00</authored-date>
  <message>Unintrusive login workflow

This was done to enable submitting a comment when logged out.</message>
  <tree>6485b743da914f2629b95c6a01d66926efc7d1b2</tree>
  <committer>
    <name>Veez (Matt Remsik)</name>
    <email>mremsik@gmail.com</email>
  </committer>
</commit>
