<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <filename>app/controllers/application_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -139,7 +139,7 @@ class IdeasController &lt; ApplicationController
       flash[:notice] = &quot;Comment added&quot;
     end
    
-    redirect_to :back
+    redirect_to :back
 
   end
  </diff>
      <filename>app/controllers/ideas_controller.rb</filename>
    </modified>
    <modified>
      <filename>app/controllers/invitations_controller.rb</filename>
    </modified>
    <modified>
      <filename>app/controllers/jobs_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,7 +17,7 @@ class MessagesController &lt; ApplicationController
     @message = current_user.sent_messages.new(params[:message])
     @user = @message.to
 
-    if verify_recaptcha(params)
+    if verify_recaptcha(params)
 
       if @message &amp;&amp; @message.save
         flash[:notice] = &quot;Message sent.&quot;
@@ -27,8 +27,8 @@ class MessagesController &lt; ApplicationController
         render :action =&gt; :new
       end
     else
-      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
-      render :action =&gt; :new
+      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
+      render :action =&gt; :new
 
     end
   end</diff>
      <filename>app/controllers/messages_controller.rb</filename>
    </modified>
    <modified>
      <filename>app/controllers/projects_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,50 +1,50 @@
-# This controller handles the login/logout function of the site.
-class SessionsController &lt; ApplicationController
-
-  # render new.rhtml
-  def new
-  end
-
-  def create
-    logout_keeping_session!    
-    user = User.authenticate(params[:login], params[:password])
-    
-      if user
-        # Protects against session fixation attacks, causes request forgery
-        # protection if user resubmits an earlier form using back
-        # button. Uncomment if you understand the tradeoffs.
-        # reset_session
-
-          if verify_recaptcha(params)
-
-            self.current_user = user
-            new_cookie_flag = (params[:remember_me] == &quot;1&quot;)
-            handle_remember_cookie! new_cookie_flag
-            redirect_back_or_default('/')
-
-          else
-              @login       = params[:login]
-              @remember_me = params[:remember_me]
-              flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
-              redirect_to :back
-
-          end
-      else
-        note_failed_signin
-        @login       = params[:login]
-        @remember_me = params[:remember_me]
-        render :action =&gt; :new
-      end
-  end
-
-  def destroy
-    logout_killing_session!
-    flash[:notice] = &quot;You have been logged out.&quot;
-    redirect_back_or_default('/')
-  end
-
-protected
-  # Track failed login attempts
+# This controller handles the login/logout function of the site.
+class SessionsController &lt; ApplicationController
+
+  # render new.rhtml
+  def new
+  end
+
+  def create
+    logout_keeping_session!    
+    user = User.authenticate(params[:login], params[:password])
+    
+      if user
+        # Protects against session fixation attacks, causes request forgery
+        # protection if user resubmits an earlier form using back
+        # button. Uncomment if you understand the tradeoffs.
+        # reset_session
+
+          if verify_recaptcha(params)
+
+            self.current_user = user
+            new_cookie_flag = (params[:remember_me] == &quot;1&quot;)
+            handle_remember_cookie! new_cookie_flag
+            redirect_back_or_default('/')
+
+          else
+              @login       = params[:login]
+              @remember_me = params[:remember_me]
+              flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
+              redirect_to :back
+
+          end
+      else
+        note_failed_signin
+        @login       = params[:login]
+        @remember_me = params[:remember_me]
+        render :action =&gt; :new
+      end
+  end
+
+  def destroy
+    logout_killing_session!
+    flash[:notice] = &quot;You have been logged out.&quot;
+    redirect_back_or_default('/')
+  end
+
+protected
+  # Track failed login attempts
   def note_failed_signin
     user = User.find_by_login params[:login]
     message = &quot;&quot;
@@ -52,11 +52,11 @@ protected
       @show_resend_activation_button = true
       message = &quot;- user not activated&quot;
     end
-    flash[:error] = &quot;Log in failed, please try again.&quot;
+    flash[:error] = &quot;Log in failed, please try again.&quot;
   
     message = [&quot;Failed login for ? from ? at ? ?&quot;, params[:login], request.remote_ip, Time.now.utc, message]
-    logger.warn  
+    logger.warn  
     
 
-  end
-end
+  end
+end</diff>
      <filename>app/controllers/sessions_controller.rb</filename>
    </modified>
    <modified>
      <filename>app/controllers/user_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,31 +1,31 @@
-class UsersController &lt; ApplicationController
-  before_filter :login_required, :update_login_time, :except =&gt; [ :new, :create, :activate, :forgot_password, :reset_password, :resend_activation_link ]
-  # render new.rhtml
-  def new
+class UsersController &lt; ApplicationController
+  before_filter :login_required, :update_login_time, :except =&gt; [ :new, :create, :activate, :forgot_password, :reset_password, :resend_activation_link ]
+  # render new.rhtml
+  def new
     @user = User.new
     @idea = Idea.new
-  end
-
-  def create
-    logout_keeping_session!
-    # check passcode to confirm this person was invited.  This is basic hard coded thing, will need to be replaced.
+  end
+
+  def create
+    logout_keeping_session!
+    # check passcode to confirm this person was invited.  This is basic hard coded thing, will need to be replaced.
       @user = User.new(params[:user])
       @idea = Idea.new(params[:idea])
       
     # will need to add javascript support to make the lookups via user browser possible, to reduce number of requests from single IP
       @new_location = params[:location_select] || params[:new_location].strip
 
-      if @user
-        @invitation = Invitation.find_by_email(@user.email)
+      if @user
+        @invitation = Invitation.find_by_email(@user.email)
         if @invitation || User.count == 0
           if @invitation
-            @user.invited_by_id = @invitation.user_id
+            @user.invited_by_id = @invitation.user_id
           else
             @user.invited_by_id = 0
           end
 
 
-           if verify_recaptcha(params)
+           if verify_recaptcha(params)
 
               if params[:location_select] || @new_location &amp;&amp; @new_location.length &gt; 0
                 @location = Locate.new params[:location_select] || @new_location
@@ -57,52 +57,52 @@ class UsersController &lt; ApplicationController
                 end
               end
 
-              
-              if @user.errors.empty? and @user.save
-                flash[:notice] = &quot;Thank you for registering.  An activation email will be sent to &quot; + @user.email + &quot; shortly.  You will be able to log in only after you activate your account.&quot;
+              
+              if @user.errors.empty? and @user.save
+                flash[:notice] = &quot;Thank you for registering.  An activation email will be sent to &quot; + @user.email + &quot; shortly.  You will be able to log in only after you activate your account.&quot;
 
                 @user.ideas &lt;&lt; @idea
                 @idea.save(false) # validations already done above
                 redirect_to :login
-              else                
-                flash[:error]  = &quot;Your registration attempt failed.  Try again.&quot;
-                render :action =&gt; :new
-              end
-           else
-                flash[:error]  = &quot;You failed the ReCaptcha test.&quot;
+              else                
+                flash[:error]  = &quot;Your registration attempt failed.  Try again.&quot;
+                render :action =&gt; :new
+              end
+           else
+                flash[:error]  = &quot;You failed the ReCaptcha test.&quot;
                 render :action =&gt; :new
-           end
+           end
        else
           flash[:error]  = &quot;Could not register.  You must be invited to join this network before you can register.&quot;
-          @user.errors.add(:email, &quot; #{ '(' + @user.email + ')' if @user.email.length &gt; 0 } not found on the invitation list.&quot;)
-          render :action =&gt; 'new'
-       end
-    else
-      flash[:error]  = &quot;Your registration attempt failed.&quot;
-      render :action =&gt; 'new'
-    end
-  end
-
-  def activate
-    logout_keeping_session!
-    user = User.find_by_activation_code(params[:activation_code]) unless params[:activation_code].blank?
-    case
-    when (!params[:activation_code].blank?) &amp;&amp; user &amp;&amp; !user.active?
-      user.activate!
+          @user.errors.add(:email, &quot; #{ '(' + @user.email + ')' if @user.email.length &gt; 0 } not found on the invitation list.&quot;)
+          render :action =&gt; 'new'
+       end
+    else
+      flash[:error]  = &quot;Your registration attempt failed.&quot;
+      render :action =&gt; 'new'
+    end
+  end
+
+  def activate
+    logout_keeping_session!
+    user = User.find_by_activation_code(params[:activation_code]) unless params[:activation_code].blank?
+    case
+    when (!params[:activation_code].blank?) &amp;&amp; user &amp;&amp; !user.active?
+      user.activate!
       flash[:notice] = &quot;Your account has been activated.  You can now log in.&quot;
       redirect_to :login
 
-    when params[:activation_code].blank?
-      flash[:error] = &quot;The activation code is missing.  Please follow the URL from your email.&quot;
-      redirect_to :login
-
-    else
-      flash[:error]  = &quot;We couldn't find a user with that activation code -- check your email? Or maybe you've already activated -- try signing in.&quot;
-      redirect_to :login
-    end
-  end
-
-  def index
+    when params[:activation_code].blank?
+      flash[:error] = &quot;The activation code is missing.  Please follow the URL from your email.&quot;
+      redirect_to :login
+
+    else
+      flash[:error]  = &quot;We couldn't find a user with that activation code -- check your email? Or maybe you've already activated -- try signing in.&quot;
+      redirect_to :login
+    end
+  end
+
+  def index
     if params[:search]
       @profiles = User.search params[:search].gsub(&quot;@&quot;, &quot;\\@&quot;), # need to get @ to work in extended mode
         :include       =&gt; [ :scorecard ],
@@ -121,9 +121,9 @@ class UsersController &lt; ApplicationController
     else
       @profiles = User.get('active', 'login asc', params[:page])
     end
-  end
-
-  def show
+  end
+
+  def show
 
     @user = User.find_by_login params[:id],
                 :include =&gt; [:active_ideas, :active_projects, :active_positions, :open_job_postings, 
@@ -150,8 +150,8 @@ class UsersController &lt; ApplicationController
     @industry_ids = @user.industry_ids
     @skill_ids = @user.general_skill_ids
         
-  end
-
+  end
+
 
   def update
     params[:password] ||= {}
@@ -206,7 +206,7 @@ class UsersController &lt; ApplicationController
   end
 
 
-  def remove_location
+  def remove_location
     if current_user.locations.count &lt; 2
       flash[:error] = &quot;Cannot remove location, you must have at least one&quot;
     else
@@ -219,98 +219,98 @@ class UsersController &lt; ApplicationController
     end
     
     redirect_to :back
-  end
-
-
-
-  # action to perform when the user wants to change their password
-  def change_password
-      return unless request.post?
-
-    if verify_recaptcha(params)
-
-      if User.authenticate(current_user.login, params[:old_password])
-        if (params[:password] == params[:password_confirmation])
-          current_user.password_confirmation = params[:password_confirmation].to_s
-          current_user.password = params[:password].to_s
-
-          current_user.reset_password
-
-          if current_user.save
-            flash[:notice] = &quot;Password updated successfully&quot;
-            redirect_to edit_profile_url
-          else
-            flash[:error] = &quot;Could not change password.&quot;
-          end
-        else
-          flash[:error] = &quot;New password mismatch&quot;
-            @old_password = params[:old_password]
-        end
-      else
-        flash[:error] = &quot;Old password incorrect&quot;
-      end
-
-    else
-      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
-
-    end
-
-  end
-
-  # action to perform when the users clicks forgot_password
-  def forgot_password
-    return unless request.post?
-
-    if verify_recaptcha(params)
-
-      if @user = User.find_by_email(params[:email])
-        @user.forgot_password
-        @user.save
-        flash[:notice] = &quot;A password reset link has been sent to your email address: #{params[:email]}&quot;
-        redirect_to :root
-      else
-        flash[:error] = &quot;Could not find a user with that email address: #{params[:email]}&quot;
-      end
-    else
-      @email       = params[:email]
-      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
-
-    end
-  end
-
-  # action to perform when the user resets the password
-  def reset_password
-    @user = User.find_by_password_reset_code(params[:code])
-    if @user == nil
-      flash[:error] = &quot;This reset link is no longer active.  You may request a new one if you need it.&quot;
-      render :action =&gt; 'forgot_password'
-    end
-    return if @user unless params[:user]
-
-    if verify_recaptcha(params)
-      if ((params[:user][:password] &amp;&amp; params[:user][:password_confirmation]))
-        self.current_user = @user # for the next two lines to work
-        current_user.password_confirmation = params[:user][:password_confirmation]
-        current_user.password = params[:user][:password]
-
-        @user.reset_password
-        current_user.password_reset_code = nil
-        if current_user.save
-          flash[:notice] = &quot;Password changed.&quot;
-          redirect_back_or_default('/')
-        else
-          flash[:error] = &quot;Could not change password.&quot;
-          @user = current_user
-        end
-
-      else
-        flash[:alert] = &quot;Password mismatch&quot;
-      end
-    else
-      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
-    end
-
-  end
+  end
+
+
+
+  # action to perform when the user wants to change their password
+  def change_password
+      return unless request.post?
+
+    if verify_recaptcha(params)
+
+      if User.authenticate(current_user.login, params[:old_password])
+        if (params[:password] == params[:password_confirmation])
+          current_user.password_confirmation = params[:password_confirmation].to_s
+          current_user.password = params[:password].to_s
+
+          current_user.reset_password
+
+          if current_user.save
+            flash[:notice] = &quot;Password updated successfully&quot;
+            redirect_to edit_profile_url
+          else
+            flash[:error] = &quot;Could not change password.&quot;
+          end
+        else
+          flash[:error] = &quot;New password mismatch&quot;
+            @old_password = params[:old_password]
+        end
+      else
+        flash[:error] = &quot;Old password incorrect&quot;
+      end
+
+    else
+      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
+
+    end
+
+  end
+
+  # action to perform when the users clicks forgot_password
+  def forgot_password
+    return unless request.post?
+
+    if verify_recaptcha(params)
+
+      if @user = User.find_by_email(params[:email])
+        @user.forgot_password
+        @user.save
+        flash[:notice] = &quot;A password reset link has been sent to your email address: #{params[:email]}&quot;
+        redirect_to :root
+      else
+        flash[:error] = &quot;Could not find a user with that email address: #{params[:email]}&quot;
+      end
+    else
+      @email       = params[:email]
+      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
+
+    end
+  end
+
+  # action to perform when the user resets the password
+  def reset_password
+    @user = User.find_by_password_reset_code(params[:code])
+    if @user == nil
+      flash[:error] = &quot;This reset link is no longer active.  You may request a new one if you need it.&quot;
+      render :action =&gt; 'forgot_password'
+    end
+    return if @user unless params[:user]
+
+    if verify_recaptcha(params)
+      if ((params[:user][:password] &amp;&amp; params[:user][:password_confirmation]))
+        self.current_user = @user # for the next two lines to work
+        current_user.password_confirmation = params[:user][:password_confirmation]
+        current_user.password = params[:user][:password]
+
+        @user.reset_password
+        current_user.password_reset_code = nil
+        if current_user.save
+          flash[:notice] = &quot;Password changed.&quot;
+          redirect_back_or_default('/')
+        else
+          flash[:error] = &quot;Could not change password.&quot;
+          @user = current_user
+        end
+
+      else
+        flash[:alert] = &quot;Password mismatch&quot;
+      end
+    else
+      flash[:error] = &quot;You failed the ReCAPTCHA test, try again&quot;
+    end
+
+  end
 
 
   def resend_activation_link
@@ -321,7 +321,7 @@ class UsersController &lt; ApplicationController
         flash[:notice] = &quot;Activation email resent, please check you mail (for security reasons we are not displaying the email address here). &quot;
       else
         flash[:error] = &quot;This account is already active.&quot;      
-      end
+      end
     else
       flash[:error] = &quot;Unknown user.&quot;
     end
@@ -345,5 +345,5 @@ class UsersController &lt; ApplicationController
     end    
   end
 
-
-end
+
+end</diff>
      <filename>app/controllers/users_controller.rb</filename>
    </modified>
    <modified>
      <filename>app/helpers/application_helper.rb</filename>
    </modified>
    <modified>
      <filename>app/helpers/ideas_helper.rb</filename>
    </modified>
    <modified>
      <filename>app/helpers/invitations_helper.rb</filename>
    </modified>
    <modified>
      <filename>app/helpers/jobs_helper.rb</filename>
    </modified>
    <modified>
      <filename>app/helpers/projects_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,2 +1,2 @@
-module SessionsHelper
+module SessionsHelper
 end
\ No newline at end of file</diff>
      <filename>app/helpers/sessions_helper.rb</filename>
    </modified>
    <modified>
      <filename>app/helpers/user_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,94 +1,94 @@
-module UsersHelper
-  
-  #
-  # Use this to wrap view elements that the user can't access.
-  # !! Note: this is an *interface*, not *security* feature !!
-  # You need to do all access control at the controller level.
-  #
-  # Example:
-  # &lt;%= if_authorized?(:index,   User)  do link_to('List all users', users_path) end %&gt; |
-  # &lt;%= if_authorized?(:edit,    @user) do link_to('Edit this user', edit_user_path) end %&gt; |
-  # &lt;%= if_authorized?(:destroy, @user) do link_to 'Destroy', @user, :confirm =&gt; 'Are you sure?', :method =&gt; :delete end %&gt; 
-  #
-  #
-  def if_authorized?(action, resource, &amp;block)
-    if authorized?(action, resource)
-      yield action, resource
-    end
-  end
-
-  #
-  # Link to user's page ('users/1')
-  #
-  # By default, their login is used as link text and link title (tooltip)
-  #
-  # Takes options
-  # * :content_text =&gt; 'Content text in place of user.login', escaped with
-  #   the standard h() function.
-  # * :content_method =&gt; :user_instance_method_to_call_for_content_text
-  # * :title_method =&gt; :user_instance_method_to_call_for_title_attribute
-  # * as well as link_to()'s standard options
-  #
-  # Examples:
-  #   link_to_user @user
-  #   # =&gt; &lt;a href=&quot;/users/3&quot; title=&quot;barmy&quot;&gt;barmy&lt;/a&gt;
-  #
-  #   # if you've added a .name attribute:
-  #  content_tag :span, :class =&gt; :vcard do
-  #    (link_to_user user, :class =&gt; 'fn n', :title_method =&gt; :login, :content_method =&gt; :name) +
-  #          ': ' + (content_tag :span, user.email, :class =&gt; 'email')
-  #   end
-  #   # =&gt; &lt;span class=&quot;vcard&quot;&gt;&lt;a href=&quot;/users/3&quot; title=&quot;barmy&quot; class=&quot;fn n&quot;&gt;Cyril Fotheringay-Phipps&lt;/a&gt;: &lt;span class=&quot;email&quot;&gt;barmy@blandings.com&lt;/span&gt;&lt;/span&gt;
-  #
-  #   link_to_user @user, :content_text =&gt; 'Your user page'
-  #   # =&gt; &lt;a href=&quot;/users/3&quot; title=&quot;barmy&quot; class=&quot;nickname&quot;&gt;Your user page&lt;/a&gt;
-  #
-  def link_to_user(user, options={})
-    raise &quot;Invalid user&quot; unless user
-    options.reverse_merge! :content_method =&gt; :login, :title_method =&gt; :login, :class =&gt; :nickname
-    content_text      = options.delete(:content_text)
-    content_text    ||= user.send(options.delete(:content_method))
-    options[:title] ||= user.send(options.delete(:title_method))
-    link_to h(content_text), user_path(user), options
-  end
-
-  #
-  # Link to login page using remote ip address as link content
-  #
-  # The :title (and thus, tooltip) is set to the IP address 
-  #
-  # Examples:
-  #   link_to_login_with_IP
-  #   # =&gt; &lt;a href=&quot;/login&quot; title=&quot;169.69.69.69&quot;&gt;169.69.69.69&lt;/a&gt;
-  #
-  #   link_to_login_with_IP :content_text =&gt; 'not signed in'
-  #   # =&gt; &lt;a href=&quot;/login&quot; title=&quot;169.69.69.69&quot;&gt;not signed in&lt;/a&gt;
-  #
-  def link_to_login_with_IP content_text=nil, options={}
-    ip_addr           = request.remote_ip
-    content_text    ||= ip_addr
-    options.reverse_merge! :title =&gt; ip_addr
-    if tag = options.delete(:tag)
-      content_tag tag, h(content_text), options
-    else
-      link_to h(content_text), login_path, options
-    end
-  end
-
-  #
-  # Link to the current user's page (using link_to_user) or to the login page
-  # (using link_to_login_with_IP).
-  #
-  def link_to_current_user(options={})
-    if current_user
-      link_to_user current_user, options
-    else
-      content_text = options.delete(:content_text) || 'not signed in'
-      # kill ignored options from link_to_user
-      [:content_method, :title_method].each{|opt| options.delete(opt)} 
-      link_to_login_with_IP content_text, options
-    end
-  end
+module UsersHelper
+  
+  #
+  # Use this to wrap view elements that the user can't access.
+  # !! Note: this is an *interface*, not *security* feature !!
+  # You need to do all access control at the controller level.
+  #
+  # Example:
+  # &lt;%= if_authorized?(:index,   User)  do link_to('List all users', users_path) end %&gt; |
+  # &lt;%= if_authorized?(:edit,    @user) do link_to('Edit this user', edit_user_path) end %&gt; |
+  # &lt;%= if_authorized?(:destroy, @user) do link_to 'Destroy', @user, :confirm =&gt; 'Are you sure?', :method =&gt; :delete end %&gt; 
+  #
+  #
+  def if_authorized?(action, resource, &amp;block)
+    if authorized?(action, resource)
+      yield action, resource
+    end
+  end
 
-
-end
+  #
+  # Link to user's page ('users/1')
+  #
+  # By default, their login is used as link text and link title (tooltip)
+  #
+  # Takes options
+  # * :content_text =&gt; 'Content text in place of user.login', escaped with
+  #   the standard h() function.
+  # * :content_method =&gt; :user_instance_method_to_call_for_content_text
+  # * :title_method =&gt; :user_instance_method_to_call_for_title_attribute
+  # * as well as link_to()'s standard options
+  #
+  # Examples:
+  #   link_to_user @user
+  #   # =&gt; &lt;a href=&quot;/users/3&quot; title=&quot;barmy&quot;&gt;barmy&lt;/a&gt;
+  #
+  #   # if you've added a .name attribute:
+  #  content_tag :span, :class =&gt; :vcard do
+  #    (link_to_user user, :class =&gt; 'fn n', :title_method =&gt; :login, :content_method =&gt; :name) +
+  #          ': ' + (content_tag :span, user.email, :class =&gt; 'email')
+  #   end
+  #   # =&gt; &lt;span class=&quot;vcard&quot;&gt;&lt;a href=&quot;/users/3&quot; title=&quot;barmy&quot; class=&quot;fn n&quot;&gt;Cyril Fotheringay-Phipps&lt;/a&gt;: &lt;span class=&quot;email&quot;&gt;barmy@blandings.com&lt;/span&gt;&lt;/span&gt;
+  #
+  #   link_to_user @user, :content_text =&gt; 'Your user page'
+  #   # =&gt; &lt;a href=&quot;/users/3&quot; title=&quot;barmy&quot; class=&quot;nickname&quot;&gt;Your user page&lt;/a&gt;
+  #
+  def link_to_user(user, options={})
+    raise &quot;Invalid user&quot; unless user
+    options.reverse_merge! :content_method =&gt; :login, :title_method =&gt; :login, :class =&gt; :nickname
+    content_text      = options.delete(:content_text)
+    content_text    ||= user.send(options.delete(:content_method))
+    options[:title] ||= user.send(options.delete(:title_method))
+    link_to h(content_text), user_path(user), options
+  end
+
+  #
+  # Link to login page using remote ip address as link content
+  #
+  # The :title (and thus, tooltip) is set to the IP address 
+  #
+  # Examples:
+  #   link_to_login_with_IP
+  #   # =&gt; &lt;a href=&quot;/login&quot; title=&quot;169.69.69.69&quot;&gt;169.69.69.69&lt;/a&gt;
+  #
+  #   link_to_login_with_IP :content_text =&gt; 'not signed in'
+  #   # =&gt; &lt;a href=&quot;/login&quot; title=&quot;169.69.69.69&quot;&gt;not signed in&lt;/a&gt;
+  #
+  def link_to_login_with_IP content_text=nil, options={}
+    ip_addr           = request.remote_ip
+    content_text    ||= ip_addr
+    options.reverse_merge! :title =&gt; ip_addr
+    if tag = options.delete(:tag)
+      content_tag tag, h(content_text), options
+    else
+      link_to h(content_text), login_path, options
+    end
+  end
+
+  #
+  # Link to the current user's page (using link_to_user) or to the login page
+  # (using link_to_login_with_IP).
+  #
+  def link_to_current_user(options={})
+    if current_user
+      link_to_user current_user, options
+    else
+      content_text = options.delete(:content_text) || 'not signed in'
+      # kill ignored options from link_to_user
+      [:content_method, :title_method].each{|opt| options.delete(opt)} 
+      link_to_login_with_IP content_text, options
+    end
+  end
+
+
+end</diff>
      <filename>app/helpers/users_helper.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class GeneralSkill &lt; ActiveRecord::Base
-  validates_presence_of     :name
-  validates_uniqueness_of   :name
+  validates_presence_of     :name
+  validates_uniqueness_of   :name
 
   has_many :polymorphic_general_skills
   </diff>
      <filename>app/models/general_skill.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ class Idea &lt; ActiveRecord::Base
   validates_size_of      :description, :maximum =&gt; 1000
 
   validates_presence_of  :industries, :message =&gt; &quot;should be selected&quot;
-  validates_size_of      :industries, :maximum =&gt; 5, :message =&gt; &quot;should not be more than 5.&quot;
+  validates_size_of      :industries, :maximum =&gt; 5, :message =&gt; &quot;should not be more than 5.&quot;
 
   acts_as_commentable
 
@@ -17,7 +17,7 @@ class Idea &lt; ActiveRecord::Base
   has_one :scorecard, :as =&gt; :scorable, :dependent =&gt; :destroy
 
   has_many :wlists, :as =&gt; :watch, :class_name =&gt; &quot;Watchlist&quot;, :dependent =&gt; :destroy
-  has_many :watchers, :through =&gt; :wlists, :source =&gt; :user
+  has_many :watchers, :through =&gt; :wlists, :source =&gt; :user
 
   has_many :interests, :as =&gt; :interest,  :dependent =&gt; :destroy
   has_many :interested, :through =&gt; :interests, :source =&gt; :user</diff>
      <filename>app/models/idea.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class Industry &lt; ActiveRecord::Base
-  validates_presence_of     :name
-  validates_uniqueness_of   :name
+  validates_presence_of     :name
+  validates_uniqueness_of   :name
 
   has_many :relevant_industries, :dependent =&gt; :destroy
 </diff>
      <filename>app/models/industry.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 
 class Invitation &lt; ActiveRecord::Base
-
+
 
   validates_presence_of     :user
   validates_presence_of     :email</diff>
      <filename>app/models/invitation.rb</filename>
    </modified>
    <modified>
      <filename>app/models/invitation_observer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
 class Job &lt; ActiveRecord::Base
 
-  validates_presence_of     :project, :message =&gt; &quot;error: a job must be attached to a project.  Please create project and post the job from it&quot;
-  validates_presence_of     :description
-  validates_presence_of     :title
-  validates_presence_of     :general_skills, :message =&gt; &quot;error: you must select at least one general skill&quot;
+  validates_presence_of     :project, :message =&gt; &quot;error: a job must be attached to a project.  Please create project and post the job from it&quot;
+  validates_presence_of     :description
+  validates_presence_of     :title
+  validates_presence_of     :general_skills, :message =&gt; &quot;error: you must select at least one general skill&quot;
  
   validates_size_of         :title, :maximum =&gt; 100
-  validates_size_of         :general_skills, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 general skills&quot;
+  validates_size_of         :general_skills, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 general skills&quot;
 
   belongs_to  :user
   belongs_to  :project
@@ -19,7 +19,7 @@ class Job &lt; ActiveRecord::Base
   has_many    :general_skills, :through =&gt; :polymorphic_general_skills
 
   has_many    :wlists, :as =&gt; :watch, :dependent =&gt; :destroy, :class_name =&gt; &quot;Watchlist&quot;
-  has_many    :watchers, :through =&gt; :wlists, :source =&gt; :user
+  has_many    :watchers, :through =&gt; :wlists, :source =&gt; :user
 
   # the logic for these counters should be looked at in tandem with those in job_application
   after_create :custom_counter_cache_after_create</diff>
      <filename>app/models/job.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@ class JobApplication &lt; ActiveRecord::Base
   validates_presence_of     :job
 
   validates_presence_of     :message
-  validates_length_of       :message, :maximum =&gt; 1000
+  validates_length_of       :message, :maximum =&gt; 1000
 
   # the logic for these counters should be looked at in tandem with those in the job model
   before_create :custom_counter_cache_after_create</diff>
      <filename>app/models/job_application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 class Locate &lt; Array
   require 'open-uri'
-  require 'hpricot'
+  require 'hpricot'
 
   attr_reader :status, :message, :count
   </diff>
      <filename>app/models/locate.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 class Location &lt; ActiveRecord::Base
   belongs_to :located, :polymorphic =&gt; true
   
-  validates_presence_of     :location
+  validates_presence_of     :location
   validates_uniqueness_of   :location, :scope =&gt; [:located_id, :located_type], :message =&gt; &quot;Location already exists&quot;
   
   after_save :update_location_for_indexing</diff>
      <filename>app/models/location.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ class Message &lt; ActiveRecord::Base
   belongs_to :to, :class_name =&gt; &quot;User&quot;
   
   validates_presence_of     :subject, :body
-  validates_length_of       :subject, :within =&gt; 0..50
+  validates_length_of       :subject, :within =&gt; 0..50
   validates_length_of       :body, :within =&gt; 0..500  
   validate  :to_must_be_real_and_active_user, :from_must_be_real_user
   
@@ -24,11 +24,11 @@ class Message &lt; ActiveRecord::Base
         errors.add :recipient, &quot; (to) not found or not active.&quot;
       end
     end
-  end
+  end
 
   def from_must_be_real_user
     errors.add :person, &quot; (from) not found.&quot; if (from_id.nil? || !User.exists?(from_id))
-  end
+  end
 
 
   private</diff>
      <filename>app/models/message.rb</filename>
    </modified>
    <modified>
      <diff>@@ -6,7 +6,7 @@ class Project &lt; ActiveRecord::Base
   validates_size_of      :description, :maximum =&gt; 1000
 
   validates_presence_of  :industries, :message =&gt; &quot;error: you must select at least one relevant industry&quot;
-  validates_size_of      :industries, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 industries&quot;
+  validates_size_of      :industries, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 industries&quot;
 
   
   acts_as_commentable
@@ -24,7 +24,7 @@ class Project &lt; ActiveRecord::Base
   has_one :scorecard, :as =&gt; :scorable, :dependent =&gt; :destroy
 
   has_many :wlists, :as =&gt; :watch, :class_name =&gt; &quot;Watchlist&quot;, :dependent =&gt; :destroy
-  has_many :watchers, :through =&gt; :wlists, :source =&gt; :user
+  has_many :watchers, :through =&gt; :wlists, :source =&gt; :user
 
   has_many :interests, :as =&gt; :interest,  :dependent =&gt; :destroy
   has_many :interested, :through =&gt; :interests, :source =&gt; :user</diff>
      <filename>app/models/project.rb</filename>
    </modified>
    <modified>
      <filename>app/models/rating.rb</filename>
    </modified>
    <modified>
      <filename>app/models/scorecard.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,59 +1,59 @@
 
-require 'digest/sha1'
-
-class User &lt; ActiveRecord::Base
-
-  include Authentication
-  include Authentication::ByPassword
-  include Authentication::ByCookieToken
-  
-  validates_presence_of     :login
-  validates_length_of       :login,    :within =&gt; 3..40
-  validates_uniqueness_of   :login
-  validates_format_of       :login,    :with =&gt; Authentication.login_regex, :message =&gt; Authentication.bad_login_message
+require 'digest/sha1'
 
-  validates_presence_of     :email
-  validates_length_of       :email,    :within =&gt; 6..100 #r@a.wk
-  validates_uniqueness_of   :email,     :message =&gt; &quot;has already been taken, perhaps you already registered.&quot;
-  validates_format_of       :email,    :with =&gt; Authentication.email_regex, :message =&gt; Authentication.bad_email_message
+class User &lt; ActiveRecord::Base
 
-  validates_format_of       :first_name,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
-  validates_length_of       :first_name,     :maximum =&gt; 30, :allow_nil =&gt; true
+  include Authentication
+  include Authentication::ByPassword
+  include Authentication::ByCookieToken
+  
+  validates_presence_of     :login
+  validates_length_of       :login,    :within =&gt; 3..40
+  validates_uniqueness_of   :login
+  validates_format_of       :login,    :with =&gt; Authentication.login_regex, :message =&gt; Authentication.bad_login_message
+
+  validates_presence_of     :email
+  validates_length_of       :email,    :within =&gt; 6..100 #r@a.wk
+  validates_uniqueness_of   :email,     :message =&gt; &quot;has already been taken, perhaps you already registered.&quot;
+  validates_format_of       :email,    :with =&gt; Authentication.email_regex, :message =&gt; Authentication.bad_email_message
+
+  validates_format_of       :first_name,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
+  validates_length_of       :first_name,     :maximum =&gt; 30, :allow_nil =&gt; true
 
-  validates_format_of       :last_name,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
-  validates_length_of       :last_name,     :maximum =&gt; 30, :allow_nil =&gt; true
+  validates_format_of       :last_name,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
+  validates_length_of       :last_name,     :maximum =&gt; 30, :allow_nil =&gt; true
 
-  validates_format_of       :company,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
-  validates_length_of       :company,     :maximum =&gt; 50, :allow_nil =&gt; true
+  validates_format_of       :company,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
+  validates_length_of       :company,     :maximum =&gt; 50, :allow_nil =&gt; true
 
-  validates_format_of       :headline,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
-  validates_length_of       :headline,     :maximum =&gt; 50, :allow_nil =&gt; true
+  validates_format_of       :headline,     :with =&gt; Authentication.name_regex,  :message =&gt; Authentication.bad_name_message, :allow_nil =&gt; true
+  validates_length_of       :headline,     :maximum =&gt; 50, :allow_nil =&gt; true
 
-  validates_length_of       :secondary_email, :allow_blank =&gt; true, :within =&gt; 6..100
-  validates_uniqueness_of   :secondary_email,   :allow_blank =&gt; true, :message =&gt; &quot;has been used for another account.&quot;
-  validates_format_of       :secondary_email,    :with =&gt; Authentication.email_regex, :message =&gt; Authentication.bad_email_message, :allow_blank =&gt; true
+  validates_length_of       :secondary_email, :allow_blank =&gt; true, :within =&gt; 6..100
+  validates_uniqueness_of   :secondary_email,   :allow_blank =&gt; true, :message =&gt; &quot;has been used for another account.&quot;
+  validates_format_of       :secondary_email,    :with =&gt; Authentication.email_regex, :message =&gt; Authentication.bad_email_message, :allow_blank =&gt; true
 
-  validates_length_of       :skills,    :within =&gt; 0..250, :allow_nil =&gt; true
-  validates_length_of       :purpose,    :within =&gt; 0..500, :allow_nil =&gt; true
+  validates_length_of       :skills,    :within =&gt; 0..250, :allow_nil =&gt; true
+  validates_length_of       :purpose,    :within =&gt; 0..500, :allow_nil =&gt; true
 
-  validates_length_of       :experience,    :within =&gt; 0..4000, :allow_nil =&gt; true
-  validates_length_of       :education,    :within =&gt; 0..1000, :allow_nil =&gt; true
+  validates_length_of       :experience,    :within =&gt; 0..4000, :allow_nil =&gt; true
+  validates_length_of       :education,    :within =&gt; 0..1000, :allow_nil =&gt; true
 
-  validates_associated      :locations, :message =&gt; &quot;must be unique (cannot have two of the same).&quot;
-  validates_presence_of     :locations, :message =&gt; &quot;error: you must have at least one location.&quot;
+  validates_associated      :locations, :message =&gt; &quot;must be unique (cannot have two of the same).&quot;
+  validates_presence_of     :locations, :message =&gt; &quot;error: you must have at least one location.&quot;
 
   # may also want to require general skills and industries, but need to add at sign up
   # only reason not to add now has been to reduce complexity of registration
   # however, the industry and general_skills models, through update, will require addition of these
-  validates_size_of         :general_skills, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 general skills.&quot;
-  validates_size_of         :relevant_industries, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 interests.&quot;
-
-  has_many :invitations, :dependent =&gt; :destroy
-  has_many :ideas
+  validates_size_of         :general_skills, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 general skills.&quot;
+  validates_size_of         :relevant_industries, :maximum =&gt; 5, :message =&gt; &quot;error: you cannot select more than 5 interests.&quot;
+
+  has_many :invitations, :dependent =&gt; :destroy
+  has_many :ideas
   has_many :active_ideas, :class_name =&gt; &quot;Idea&quot;, :conditions =&gt; &quot;ideas.active&quot;
 
-  has_many :projects
-  has_many :comments
+  has_many :projects
+  has_many :comments
 
   has_many :jobs, :dependent =&gt; :destroy
   has_many :job_applications, :dependent =&gt; :destroy
@@ -101,7 +101,7 @@ class User &lt; ActiveRecord::Base
   has_many :watchlists, :dependent =&gt; :destroy
   # figure out who is watching this user
   has_many :wlists, :as =&gt; :watch, :dependent =&gt; :destroy, :class_name =&gt; &quot;Watchlist&quot;
-  has_many :watchers, :through =&gt; :wlists, :source =&gt; :user
+  has_many :watchers, :through =&gt; :wlists, :source =&gt; :user
 
   # for dashboard - watched ideas
   has_many :watched_ideas, :through =&gt; :watchlists, :source =&gt; :watch, :source_type =&gt; &quot;Idea&quot;, :conditions =&gt; &quot;ideas.active&quot;
@@ -147,16 +147,16 @@ class User &lt; ActiveRecord::Base
 
   has_many :icebreakers
 
-  before_create :make_activation_code
+  before_create :make_activation_code
   after_create  :create_some_objects
   before_update :custom_counter_cache_before_update
   before_destroy :log   # decreaseing active member count on projects not needed
                         # because this will be handled through destroy of job application
 
-  
-  # HACK HACK HACK -- how to do attr_accessible from here?
-  # prevents a user from submitting a crafted form that bypasses activation
-  # anything else you want your user to change should be added here.
+  
+  # HACK HACK HACK -- how to do attr_accessible from here?
+  # prevents a user from submitting a crafted form that bypasses activation
+  # anything else you want your user to change should be added here.
   attr_accessible :login,
                   :email,
                   :secondary_email,
@@ -176,89 +176,89 @@ class User &lt; ActiveRecord::Base
                   :password_confirmation,
                   :last_logon,
                   :previous_logon,
-                  :idea_attributes # virtual attribute
+                  :idea_attributes # virtual attribute
 
 
-  def self.get(conditions, order, page)
+  def self.get(conditions, order, page)
      paginate :include =&gt; [ :scorecard ],
-              :per_page =&gt; 10, :page =&gt; page,
-              :conditions =&gt; conditions,
-              :order =&gt; order
-  end
-
-  # Activates the user in the database.
-  def activate!
+              :per_page =&gt; 10, :page =&gt; page,
+              :conditions =&gt; conditions,
+              :order =&gt; order
+  end
+
+  # Activates the user in the database.
+  def activate!
 
     now = Time.now.utc
-    @activated = true
-    self.activated_at = now
-    self.activation_code = nil
+    @activated = true
+    self.activated_at = now
+    self.activation_code = nil
     self.active = true # needed because default when registering is false to prevent
                        # the profile from coming up in search results, etc
-    save(false)
+    save(false)
 
     logon.previous = logon.last = now
     logon.save(false)
 
-  end
-
-  # Returns true if the user has just been activated.
-  def recently_activated?
-    @activated
-  end
-
-  def active?
-    # the existence of an activation code means they have not activated yet
-    activation_code.nil?
-  end
-
-  # Authenticates a user by their login name and unencrypted password.  Returns the user or nil.
-  #
-  # uff.  this is really an authorization, not authentication routine.
-  # We really need a Dispatch Chain here or something.
-  # This will also let us return a human error message.
-  #
-  def self.authenticate(login, password)
-    return nil if login.blank? || password.blank?
-    u = find :first, :conditions =&gt; ['(login = ? or email = ?) and activated_at IS NOT NULL', login, login] # need to get the salt
-    u &amp;&amp; u.authenticated?(password) ? u : nil
-  end
-
-  def login=(value)
-    write_attribute :login, (value ? value.downcase : nil)
-  end
-
-  def email=(value)
-    write_attribute :email, (value ? value.downcase : nil)
-  end
-
-
-  def forgot_password
-    @forgotten_password = true
-    self.make_password_reset_code
-  end
-
-  def reset_password
-    # First update the password_reset_code before setting the
-    # reset_password flag to avoid duplicate mail notifications.
-    update_attributes(:password_reset_code =&gt; nil)
-    @reset_password = nil
-  end
-
-  # Used in user_observer
-  def recently_forgot_password?
-    @forgotten_password
-  end
-
-  # Used in user_observer
-  def recently_reset_password?
-    @reset_password
-  end
-
-  # Used in user_observer
-  def recently_activated?
-    @activated
-  end
+  end
+
+  # Returns true if the user has just been activated.
+  def recently_activated?
+    @activated
+  end
+
+  def active?
+    # the existence of an activation code means they have not activated yet
+    activation_code.nil?
+  end
+
+  # Authenticates a user by their login name and unencrypted password.  Returns the user or nil.
+  #
+  # uff.  this is really an authorization, not authentication routine.
+  # We really need a Dispatch Chain here or something.
+  # This will also let us return a human error message.
+  #
+  def self.authenticate(login, password)
+    return nil if login.blank? || password.blank?
+    u = find :first, :conditions =&gt; ['(login = ? or email = ?) and activated_at IS NOT NULL', login, login] # need to get the salt
+    u &amp;&amp; u.authenticated?(password) ? u : nil
+  end
+
+  def login=(value)
+    write_attribute :login, (value ? value.downcase : nil)
+  end
+
+  def email=(value)
+    write_attribute :email, (value ? value.downcase : nil)
+  end
+
+
+  def forgot_password
+    @forgotten_password = true
+    self.make_password_reset_code
+  end
+
+  def reset_password
+    # First update the password_reset_code before setting the
+    # reset_password flag to avoid duplicate mail notifications.
+    update_attributes(:password_reset_code =&gt; nil)
+    @reset_password = nil
+  end
+
+  # Used in user_observer
+  def recently_forgot_password?
+    @forgotten_password
+  end
+
+  # Used in user_observer
+  def recently_reset_password?
+    @reset_password
+  end
+
+  # Used in user_observer
+  def recently_activated?
+    @activated
+  end
 
   def author?(author)
     # this for rating.  name of method needs to be renamed for profiles, but initially done for ideas and projects
@@ -462,22 +462,22 @@ class User &lt; ActiveRecord::Base
 
 
  
-  protected
+  protected
 
   def create_some_objects
     self.create_scorecard
     self.create_logon
   end
-
-  def make_activation_code
-
-    self.activation_code = self.class.make_token
-  end
-
-  def make_password_reset_code
-    self.password_reset_code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )
-  end
-
+
+  def make_activation_code
+
+    self.activation_code = self.class.make_token
+  end
+
+  def make_password_reset_code
+    self.password_reset_code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join )
+  end
+
 
   # need to use an association with source_type instead
   def extract_from_watchlist(list)
@@ -556,4 +556,4 @@ class User &lt; ActiveRecord::Base
   end
 
 
-end
+end</diff>
      <filename>app/models/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,53 +1,53 @@
-class UserMailer &lt; ActionMailer::Base
+class UserMailer &lt; ActionMailer::Base
 
     
-  def signup_notification(user)
-    setup_email(user)
-    @subject    += 'Please activate your new account'
-    @body[:url]  = &quot;http://#{domain}/activate/#{user.activation_code}&quot;
-  end
-
-  def activation(user)
-    setup_email(user)
-    @subject    += 'Your account has been activated!'
-    @body[:url]  = &quot;http://www.commune2.com/&quot;
-  end
-
-  def forgot_password(user)
-    setup_email(user)
-
-    @subject    += 'Password reset help'
-    @body[:url]  = &quot;http://#{domain}/reset_password/#{user.password_reset_code}&quot;
-  end
-
-  def reset_password(user)
-    setup_email(user,'Your password has been reset.')
-  end
-
-  def general(options = {})
-
-      @recipients  = options[:recipients]
+  def signup_notification(user)
+    setup_email(user)
+    @subject    += 'Please activate your new account'
+    @body[:url]  = &quot;http://#{domain}/activate/#{user.activation_code}&quot;
+  end
+
+  def activation(user)
+    setup_email(user)
+    @subject    += 'Your account has been activated!'
+    @body[:url]  = &quot;http://www.commune2.com/&quot;
+  end
+
+  def forgot_password(user)
+    setup_email(user)
+
+    @subject    += 'Password reset help'
+    @body[:url]  = &quot;http://#{domain}/reset_password/#{user.password_reset_code}&quot;
+  end
+
+  def reset_password(user)
+    setup_email(user,'Your password has been reset.')
+  end
+
+  def general(options = {})
+
+      @recipients  = options[:recipients]
       @from        = options[:from] || postman
-      @reply_to    = options[:reply_to] if options[:reply_to]
-
-      @subject     = options[:subject] || &quot;Commune2.com email&quot;
-      @sent_on     = Time.now
-      @bcc = postman
-
-      @body[:who] = options[:who] || @reply_to
-      @body[:message] = options[:message]
-      @body[:url]  = options[:url] || &quot;http://www.commune2.com/&quot;
-
-  end
-
+      @reply_to    = options[:reply_to] if options[:reply_to]
+
+      @subject     = options[:subject] || &quot;Commune2.com email&quot;
+      @sent_on     = Time.now
+      @bcc = postman
+
+      @body[:who] = options[:who] || @reply_to
+      @body[:message] = options[:message]
+      @body[:url]  = options[:url] || &quot;http://www.commune2.com/&quot;
+
+  end
+
 
   def message(msg)
     who = msg.from.name.blank? ? msg.from.login : msg.from.name
     @recipients       = msg.to.email
-    @from             = postman
+    @from             = postman
     @reply_to         = msg.from.email
     @subject          = &quot;[commune2 | &quot; + who + &quot;] &quot; + msg.subject
-    @sent_on          = Time.now
+    @sent_on          = Time.now
     @bcc              = @from
 
     @body[:message]   = msg.body
@@ -55,17 +55,17 @@ class UserMailer &lt; ActionMailer::Base
     @body[:profile]   = msg.from
     
   end
-
-  protected
-    def setup_email(user)
-      @recipients  = &quot;#{user.email}&quot;
-      @from        = postman
-      @subject     = &quot;[commune2.com] &quot;
-      @sent_on     = Time.now
-      @bcc = @from
-
-      @body[:user] = user
-    end
+
+  protected
+    def setup_email(user)
+      @recipients  = &quot;#{user.email}&quot;
+      @from        = postman
+      @subject     = &quot;[commune2.com] &quot;
+      @sent_on     = Time.now
+      @bcc = @from
+
+      @body[:user] = user
+    end
 
 private
 
@@ -76,5 +76,5 @@ private
   def postman
     ENV['RAILS_ENV'] == &quot;production&quot; ? &quot;Commune2 Postman &lt;postman@mailer.commune2.com&gt;&quot; : &quot;C2 DEV Postman &lt;devpost@mailer.commune2.com&gt;&quot;
   end
-
-end
+
+end</diff>
      <filename>app/models/user_mailer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,16 +1,16 @@
-class UserObserver &lt; ActiveRecord::Observer
-  def after_create(user)
-    UserMailer.deliver_signup_notification(user)
+class UserObserver &lt; ActiveRecord::Observer
+  def after_create(user)
+    UserMailer.deliver_signup_notification(user)
     invite = Invitation.find_by_email(user.email)
     if invite
       invite.registered = user
-      invite.save(false)
-    end
-  end
-
-  def after_save(user)
-    UserMailer.deliver_activation(user) if user.recently_activated?
-    UserMailer.deliver_forgot_password(user) if user.recently_forgot_password?
-    UserMailer.deliver_reset_password(user) if user.recently_reset_password?
-  end
-end
+      invite.save(false)
+    end
+  end
+
+  def after_save(user)
+    UserMailer.deliver_activation(user) if user.recently_activated?
+    UserMailer.deliver_forgot_password(user) if user.recently_forgot_password?
+    UserMailer.deliver_reset_password(user) if user.recently_reset_password?
+  end
+end</diff>
      <filename>app/models/user_observer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-  &lt;div id=&quot;comment&quot;&gt;
+  &lt;div id=&quot;comment&quot;&gt;
     &lt;hr class=&quot;dashed&quot;&gt;
 
     &lt;% if comment.user %&gt;
@@ -9,8 +9,8 @@
     
     (&lt;%= time_ago_in_words(comment.created_at) %&gt; ago)
 
-    &lt;p&gt;&lt;%= simple_format(strip_tags(comment.comment)) %&gt;&lt;/p&gt;
+    &lt;p&gt;&lt;%= simple_format(strip_tags(comment.comment)) %&gt;&lt;/p&gt;
         
     &lt;%= button_to_delete_if_allowed comment %&gt;
-  &lt;/div&gt;
+  &lt;/div&gt;
 </diff>
      <filename>app/views/comments/_comment.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/ideas/_idea.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,33 +1,33 @@
 &lt;% content_for :title do %&gt;Editing Idea&lt;% end %&gt;
 
-
-  &lt;h1&gt;Edit Idea&lt;/h1&gt;
+
+  &lt;h1&gt;Edit Idea&lt;/h1&gt;
   &lt;p&gt;&lt;%= link_to &quot;Exit edit&quot;, idea_path(:id =&gt; @idea) %&gt;&lt;/p&gt;
-
-&lt;div id=&quot;post&quot;&gt;
-
- &lt;%= error_messages_for :idea %&gt;
-
- &lt;% form_for @idea do |f| -%&gt;
-
- &lt;p&gt;Is this idea active or inactive?
-   &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
-   &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
-   &lt;i&gt;Only active ideas can be viewed by others.&lt;/i&gt;&lt;/p&gt;
-
-
-  &lt;p&gt;&lt;%= label_tag 'Title' %&gt;&lt;br/&gt;
-  &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
-
-
-  &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
-  &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+&lt;div id=&quot;post&quot;&gt;
+
+ &lt;%= error_messages_for :idea %&gt;
+
+ &lt;% form_for @idea do |f| -%&gt;
+
+ &lt;p&gt;Is this idea active or inactive?
+   &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
+   &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
+   &lt;i&gt;Only active ideas can be viewed by others.&lt;/i&gt;&lt;/p&gt;
+
+
+  &lt;p&gt;&lt;%= label_tag 'Title' %&gt;&lt;br/&gt;
+  &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+
+  &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
+  &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
 
   &lt;p&gt;Select relevant industries (no more than 5 please)&lt;/p&gt; 
 
   &lt;%= render :partial =&gt; '/shared/industries', :locals =&gt; { :industry_ids =&gt; @industry_ids} %&gt;
 
-
-  &lt;p&gt;&lt;%= submit_tag &quot;Update&quot; %&gt;&lt;/p&gt;
-  &lt;% end %&gt;
-&lt;/div&gt;
+
+  &lt;p&gt;&lt;%= submit_tag &quot;Update&quot; %&gt;&lt;/p&gt;
+  &lt;% end %&gt;
+&lt;/div&gt;</diff>
      <filename>app/views/ideas/edit.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/ideas/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -16,18 +16,18 @@
 
   &lt;/div&gt;
 &lt;% end %&gt;
-
-
-&lt;% if @ideas.blank? %&gt;
+
+
+&lt;% if @ideas.blank? %&gt;
   &lt;% unless flash[:new_project] %&gt;
     &lt;h1&gt;Got ideas?&lt;/h1&gt;
-    &lt;p&gt;You have not posted any ideas yet.  Click &lt;%= link_to 'here', new_idea_path %&gt; if you would like to post your first.&lt;/p&gt;
+    &lt;p&gt;You have not posted any ideas yet.  Click &lt;%= link_to 'here', new_idea_path %&gt; if you would like to post your first.&lt;/p&gt;
   &lt;% end %&gt;
 &lt;% else %&gt;
-
+
   &lt;h1&gt;My Ideas&lt;/h1&gt;
-  &lt;%= render :partial =&gt; @ideas %&gt;
-&lt;% end %&gt;
-
-&lt;%= will_paginate @ideas %&gt;
-
+  &lt;%= render :partial =&gt; @ideas %&gt;
+&lt;% end %&gt;
+
+&lt;%= will_paginate @ideas %&gt;
+</diff>
      <filename>app/views/ideas/my_ideas.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -4,34 +4,34 @@
 &lt;tr&gt;
   &lt;td width=&quot;70%&quot; valign=&quot;top&quot;&gt;  
 
-    &lt;h1&gt;New Idea&lt;/h1&gt;
-
-    &lt;div id=&quot;post&quot;&gt;
-
-      &lt;% form_for @idea do |f| -%&gt;
+    &lt;h1&gt;New Idea&lt;/h1&gt;
+
+    &lt;div id=&quot;post&quot;&gt;
+
+      &lt;% form_for @idea do |f| -%&gt;
          &lt;%= f.error_messages %&gt;
-
-         &lt;p&gt;Is this idea active or inactive?
-           &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
-           &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
-           &lt;i&gt;Only active ideas can be viewed by others.&lt;/i&gt;&lt;/p&gt;
-
-
-          &lt;p&gt;&lt;%= label_tag 'Title' %&gt;&lt;br/&gt;
-          &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
-
-
-          &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
-          &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+         &lt;p&gt;Is this idea active or inactive?
+           &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
+           &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
+           &lt;i&gt;Only active ideas can be viewed by others.&lt;/i&gt;&lt;/p&gt;
+
+
+          &lt;p&gt;&lt;%= label_tag 'Title' %&gt;&lt;br/&gt;
+          &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+
+          &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
+          &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
 
           &lt;p&gt;Select relevant categories (no more than 5 please)&lt;%= &quot;, &lt;i&gt;&quot; + pluralize(@industry_ids.size, &quot;category&quot;) + &quot; &quot; + @message + &quot;&lt;/i&gt;&quot; unless @message.blank? %&gt;&lt;/p&gt;
 
           &lt;%= render :partial =&gt; '/shared/industries', :locals =&gt; { :industry_ids =&gt; @industry_ids } %&gt;
 
-
-          &lt;p&gt;&lt;%= submit_tag &quot;Post Idea&quot; %&gt;&lt;/p&gt;
-      &lt;% end %&gt;
-    &lt;/div&gt;
+
+          &lt;p&gt;&lt;%= submit_tag &quot;Post Idea&quot; %&gt;&lt;/p&gt;
+      &lt;% end %&gt;
+    &lt;/div&gt;
   &lt;/td&gt;
   &lt;td valign=&quot;top&quot; align=&quot;center&quot;&gt;
     &lt;table border=&quot;0&quot; width=&quot;90%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot;&gt;</diff>
      <filename>app/views/ideas/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 &lt;% content_for :title do %&gt;Idea &lt;% end %&gt;
-
-&lt;% if @idea.blank? %&gt;
-  &lt;p&gt;Sorry, no idea to see here.&lt;/p&gt;
 
-&lt;% else %&gt;
+&lt;% if @idea.blank? %&gt;
+  &lt;p&gt;Sorry, no idea to see here.&lt;/p&gt;
+
+&lt;% else %&gt;
 
 
   &lt;div id=&quot;show-container&quot;&gt;
@@ -13,9 +13,9 @@
     &lt;div id=&quot;show-action-menu&quot;&gt;
 
 
-      &lt;% if @idea.user_id == current_user.id %&gt;
+      &lt;% if @idea.user_id == current_user.id %&gt;
         &lt;%= link_to &quot;edit&quot;, edit_idea_path(@idea), :class =&gt; &quot;action_menu_edit&quot; %&gt;
-      &lt;% end %&gt;
+      &lt;% end %&gt;
 
       &lt;%= link_to &quot;launch project&quot;, new_idea_project_path(@idea), :class =&gt; &quot;action_menu_launch_project&quot; %&gt;
 
@@ -25,26 +25,26 @@
     &lt;/div&gt;
 
     &lt;div id=&quot;show-main-container&quot;&gt;
-    
+    
       &lt;h1&gt;&lt;%= image_tag(&quot;/images/other_icons/watched_item_icon_yellow.png&quot;, :border =&gt; 0, :title =&gt; &quot;On Watchlist&quot;) if current_user.watched_ideas.include?(@idea) %&gt;
-        &lt;%=h @idea.title %&gt;&lt;/h1&gt;
+        &lt;%=h @idea.title %&gt;&lt;/h1&gt;
 
-      &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @idea}  %&gt;
+      &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @idea}  %&gt;
 
       &lt;p&gt;Relevant industries: &lt;%= @idea.industries_string %&gt;&lt;/p&gt;
       
-      &lt;%= @idea.user ? render(:partial =&gt; @idea.user) : &quot;Anonymous&quot; %&gt;
+      &lt;%= @idea.user ? render(:partial =&gt; @idea.user) : &quot;Anonymous&quot; %&gt;
 
       &lt;p&gt;
         Posted: &lt;%= time_ago_in_words(@idea.created_at) %&gt; ago
         &lt;% if @idea.created_at &lt; @idea.updated_at %&gt;
           | Updated: &lt;%= time_ago_in_words(@idea.updated_at) %&gt; ago
         &lt;% end %&gt;  
-      &lt;/p&gt;
+      &lt;/p&gt;
 
-      &lt;hr /&gt;
+      &lt;hr /&gt;
 
-      &lt;p&gt;&lt;b&gt;Details&lt;/b&gt;&lt;br /&gt;&lt;%= simple_format(strip_tags(@idea.description)) %&gt;&lt;/p&gt;
+      &lt;p&gt;&lt;b&gt;Details&lt;/b&gt;&lt;br /&gt;&lt;%= simple_format(strip_tags(@idea.description)) %&gt;&lt;/p&gt;
 
       &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
         &lt;tr&gt;
@@ -52,31 +52,31 @@
             &lt;%= image_tag(&quot;other_icons/comment_icon_sm.png&quot;, :border =&gt;&quot;0&quot;) %&gt;
           &lt;/td&gt;
           &lt;td valign=&quot;center&quot;&gt;
-            &lt;%= pluralize @idea.scorecard.total_comments_count, &quot;Comment&quot; %&gt;
+            &lt;%= pluralize @idea.scorecard.total_comments_count, &quot;Comment&quot; %&gt;
           &lt;/td&gt;
         &lt;/tr&gt;
       &lt;/table&gt;
 
-      &lt;%= render :partial =&gt; @idea.comments %&gt;
+      &lt;%= render :partial =&gt; @idea.comments %&gt;
 
       &lt;div id=&quot;postcomment&quot;&gt;
-        &lt;h2&gt;New Comment&lt;/h2&gt;
-      
-        &lt;% form_tag post_idea_comment_path do -%&gt;
-              &lt;%= text_area_tag 'newcomment', @comment, :rows =&gt; 10, :cols =&gt; 38 %&gt;
-               &lt;%= hidden_field_tag 'idea', @idea.id %&gt;
-              &lt;p&gt;&lt;%= submit_tag 'Post Comment' %&gt;&lt;/p&gt;
-              &lt;% end %&gt;
-      &lt;/div&gt;
+        &lt;h2&gt;New Comment&lt;/h2&gt;
+      
+        &lt;% form_tag post_idea_comment_path do -%&gt;
+              &lt;%= text_area_tag 'newcomment', @comment, :rows =&gt; 10, :cols =&gt; 38 %&gt;
+               &lt;%= hidden_field_tag 'idea', @idea.id %&gt;
+              &lt;p&gt;&lt;%= submit_tag 'Post Comment' %&gt;&lt;/p&gt;
+              &lt;% end %&gt;
+      &lt;/div&gt;
 
 
-    &lt;/div&gt;
+    &lt;/div&gt;
 
-    &lt;div id=&quot;show-stat&quot;&gt;      
+    &lt;div id=&quot;show-stat&quot;&gt;      
         &lt;%= stats_for @idea, {:icons_side =&gt; &quot;left&quot;, :breakout =&gt; true} %&gt;
     &lt;/div&gt;            
-
-  &lt;/div&gt;
 
-
+  &lt;/div&gt;
+
+
 &lt;% end %&gt;</diff>
      <filename>app/views/ideas/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 
   &lt;% status = invitation.status %&gt;
-  
+  
     &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; width=&quot;100%&quot;&gt;
       &lt;tr&gt;
         &lt;td&gt;</diff>
      <filename>app/views/invitations/_invitation.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/invitations/new.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/jobs/_job.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,31 +1,31 @@
 &lt;% content_for :title do %&gt;Editing Job&lt;% end %&gt;
-
-&lt;h1&gt;Edit Job&lt;/h1&gt;
+
+&lt;h1&gt;Edit Job&lt;/h1&gt;
 &lt;p&gt;&lt;%= link_to &quot;Exit edit&quot;, job_path(:id =&gt; @job) %&gt;&lt;/p&gt;
-
-&lt;div id=&quot;post&quot;&gt;
-
-&lt;% form_for @job do |f| -%&gt;
+
+&lt;div id=&quot;post&quot;&gt;
+
+&lt;% form_for @job do |f| -%&gt;
 
   &lt;%= f.error_messages %&gt;
-
-     &lt;p&gt;Is this job post active or inactive?
-       &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
-       &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
-       &lt;i&gt;Only active job posts can be viewed by others.&lt;/i&gt;&lt;/p&gt;
-
-      &lt;p&gt;&lt;%= label_tag 'Job title' %&gt;&lt;br/&gt;
-      &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+     &lt;p&gt;Is this job post active or inactive?
+       &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
+       &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
+       &lt;i&gt;Only active job posts can be viewed by others.&lt;/i&gt;&lt;/p&gt;
+
+      &lt;p&gt;&lt;%= label_tag 'Job title' %&gt;&lt;br/&gt;
+      &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
 
       &lt;%= label_tag 'General skills' %&gt;&lt;br /&gt;
       &lt;i&gt;Please select no more than 5:&lt;/i&gt;
 
        &lt;%= render :partial =&gt; '/shared/general_skills', :locals =&gt; { :skill_ids =&gt; @skill_ids } %&gt;
 
-
-      &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
-      &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
-
-      &lt;p&gt;&lt;%= submit_tag &quot;Update&quot; %&gt;&lt;/p&gt;
-      &lt;% end %&gt;
-&lt;/div&gt;
+
+      &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
+      &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+      &lt;p&gt;&lt;%= submit_tag &quot;Update&quot; %&gt;&lt;/p&gt;
+      &lt;% end %&gt;
+&lt;/div&gt;</diff>
      <filename>app/views/jobs/edit.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/jobs/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
 &lt;% content_for :title do %&gt;My Posted Jobs&lt;% end %&gt;
-
-
-&lt;h1&gt;&lt;%= @title %&gt;&lt;/h1&gt;
-
-&lt;% if @jobs.blank? %&gt;
-  You have not posted any jobs yet.
-&lt;% else %&gt;
-  &lt;%= render :partial =&gt; @jobs %&gt;
-&lt;% end %&gt;
-
+
+
+&lt;h1&gt;&lt;%= @title %&gt;&lt;/h1&gt;
+
+&lt;% if @jobs.blank? %&gt;
+  You have not posted any jobs yet.
+&lt;% else %&gt;
+  &lt;%= render :partial =&gt; @jobs %&gt;
+&lt;% end %&gt;
+
 &lt;%= will_paginate @jobs %&gt;</diff>
      <filename>app/views/jobs/my_posted_jobs.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -5,41 +5,41 @@
 &lt;tr&gt;
   &lt;td width=&quot;70%&quot; valign=&quot;top&quot;&gt;  
 
-    &lt;h1&gt;New Job&lt;/h1&gt;
+    &lt;h1&gt;New Job&lt;/h1&gt;
 
-    &lt;div id=&quot;post&quot;&gt;
-    &lt;% form_for @job do |f| -%&gt;
+    &lt;div id=&quot;post&quot;&gt;
+    &lt;% form_for @job do |f| -%&gt;
 
       &lt;%= f.error_messages %&gt;
 
-
-    &lt;% if @project %&gt;
-      &lt;p&gt;This job is for the &lt;%= link_to h(@project.title), project_path(:id =&gt; @project) %&gt; project.&lt;/p&gt;
-      &lt;p&gt;The job post will have a link to the project if the project is active.&lt;/p&gt;
-      &lt;%= f.hidden_field :project_id, :value =&gt; @project.id %&gt;
-    &lt;% end %&gt;
-
-
-     &lt;p&gt;Is this job post active or inactive?
-       &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
-       &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
-       &lt;i&gt;Only active job posts can be viewed by others.&lt;/i&gt;&lt;/p&gt;
-
-          &lt;p&gt;&lt;%= label_tag 'Job title' %&gt;&lt;br/&gt;
-          &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+    &lt;% if @project %&gt;
+      &lt;p&gt;This job is for the &lt;%= link_to h(@project.title), project_path(:id =&gt; @project) %&gt; project.&lt;/p&gt;
+      &lt;p&gt;The job post will have a link to the project if the project is active.&lt;/p&gt;
+      &lt;%= f.hidden_field :project_id, :value =&gt; @project.id %&gt;
+    &lt;% end %&gt;
+
+
+     &lt;p&gt;Is this job post active or inactive?
+       &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
+       &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
+       &lt;i&gt;Only active job posts can be viewed by others.&lt;/i&gt;&lt;/p&gt;
+
+          &lt;p&gt;&lt;%= label_tag 'Job title' %&gt;&lt;br/&gt;
+          &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
 
           &lt;%= label_tag 'General skills' %&gt;&lt;br /&gt;
           &lt;i&gt;Please select no more than 5:&lt;/i&gt;
 
            &lt;%= render :partial =&gt; '/shared/general_skills', :locals =&gt; { :skill_ids =&gt; @skill_ids } %&gt;
 
-          &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
-          &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot;  %&gt;&lt;/p&gt;
-
-
-          &lt;p&gt;&lt;%= submit_tag &quot;Create Job&quot; %&gt;&lt;/p&gt;
-          &lt;% end %&gt;
-    &lt;/div&gt;
+          &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
+          &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot;  %&gt;&lt;/p&gt;
+
+
+          &lt;p&gt;&lt;%= submit_tag &quot;Create Job&quot; %&gt;&lt;/p&gt;
+          &lt;% end %&gt;
+    &lt;/div&gt;
 
   &lt;/td&gt;
   &lt;td valign=&quot;top&quot; align=&quot;center&quot;&gt;</diff>
      <filename>app/views/jobs/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 &lt;% content_for :title do %&gt;Job &lt;% end %&gt;
-
-&lt;% if @job.blank? %&gt;
-  &lt;p&gt;Sorry, no job to see here.&lt;/p&gt;
 
-&lt;% else %&gt;
+&lt;% if @job.blank? %&gt;
+  &lt;p&gt;Sorry, no job to see here.&lt;/p&gt;
+
+&lt;% else %&gt;
 
 
   &lt;div id=&quot;show-container&quot;&gt;
@@ -22,15 +22,15 @@
     &lt;/div&gt;
 
     &lt;div id=&quot;show-main-container&quot;&gt;
-    
-      &lt;h1&gt;&lt;%= image_tag(&quot;/images/other_icons/watched_item_icon_yellow.png&quot;, :border =&gt; 0, :title =&gt; &quot;On Watchlist&quot;) if current_user.watched_jobs.include?(@job) %&gt; &lt;%=h @job.title %&gt;&lt;/h1&gt;
+    
+      &lt;h1&gt;&lt;%= image_tag(&quot;/images/other_icons/watched_item_icon_yellow.png&quot;, :border =&gt; 0, :title =&gt; &quot;On Watchlist&quot;) if current_user.watched_jobs.include?(@job) %&gt; &lt;%=h @job.title %&gt;&lt;/h1&gt;
 
       &lt;p&gt;
         Posted: &lt;%= time_ago_in_words(@job.created_at) %&gt; ago
         &lt;% if @job.created_at &lt; @job.updated_at %&gt;
           | Updated: &lt;%= time_ago_in_words(@job.updated_at) %&gt; ago
         &lt;% end %&gt;  
-      &lt;/p&gt;
+      &lt;/p&gt;
 
       &lt;% if @job.hired_user %&gt;
         &lt;p&gt;Currently at this position:&lt;/p&gt;
@@ -42,20 +42,20 @@
       &lt;%=h @job.general_skills_string %&gt;&lt;/p&gt;
 
       &lt;p&gt;&lt;b&gt;Details&lt;/b&gt;&lt;br /&gt;
-      &lt;%= simple_format(h(strip_tags(@job.description))) %&gt;&lt;/p&gt;
+      &lt;%= simple_format(h(strip_tags(@job.description))) %&gt;&lt;/p&gt;
 
       &lt;div id=&quot;white-divider&quot;&gt;&amp;nbsp;&lt;/div&gt;
-      &lt;% if @job.project and (@job.project.active? || @job.user == current_user) %&gt;
+      &lt;% if @job.project and (@job.project.active? || @job.user == current_user) %&gt;
         &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;Project&lt;/h2&gt;&lt;/div&gt;
         &lt;%= render :partial =&gt; @job.project %&gt;
-      &lt;% end %&gt;
+      &lt;% end %&gt;
 
       &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;Who's hiring?&lt;/h2&gt;&lt;/div&gt;
 
-      &lt;%= @job.user ? render(:partial =&gt; @job.user) : &quot;Anonymous&quot; %&gt;
+      &lt;%= @job.user ? render(:partial =&gt; @job.user) : &quot;Anonymous&quot; %&gt;
 
 
-  &lt;% if @job.project.user == current_user or (@job.project.members.include?(current_user) and not @job.job_applications.find_by_user_id(current_user.id)) %&gt;
+  &lt;% if @job.project.user == current_user or (@job.project.members.include?(current_user) and not @job.job_applications.find_by_user_id(current_user.id)) %&gt;
     &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;&lt;%= pluralize @job.applicants.count, &quot;Job Applicant&quot; %&gt;&lt;/h2&gt;&lt;/div&gt;
 
     &lt;% @job.job_applications.each do |application| %&gt;
@@ -88,10 +88,10 @@
 
     &lt;% end %&gt;
 
-  &lt;% end %&gt;
+  &lt;% end %&gt;
 
 
-      &lt;% if @job.applicants.include?(current_user) %&gt;
+      &lt;% if @job.applicants.include?(current_user) %&gt;
 
         &lt;% if @job.hired_user == current_user %&gt;
           &lt;p&gt;You are currently hired for this job.&lt;/p&gt;
@@ -111,43 +111,43 @@
           
         &lt;% else %&gt;
 
-            &lt;p&gt;&lt;b&gt;You applied for this job on &lt;%= time_ago_in_words(@application.created_at) %&gt; ago.&lt;/b&gt;&lt;/p&gt;
+            &lt;p&gt;&lt;b&gt;You applied for this job on &lt;%= time_ago_in_words(@application.created_at) %&gt; ago.&lt;/b&gt;&lt;/p&gt;
 
             &lt;% form_for @application do |f| -%&gt;
              &lt;%= f.text_area :message, :rows =&gt; 10, :cols =&gt; 60 %&gt;
-              &lt;p&gt;&lt;%= submit_tag 'Update Job Application' %&gt;&lt;/p&gt;
+              &lt;p&gt;&lt;%= submit_tag 'Update Job Application' %&gt;&lt;/p&gt;
             &lt;% end %&gt;
-            
+            
             &lt;%= button_to &quot;Delete Application&quot;, job_application_path(@application), :confirm =&gt; &quot;Are you sure you want to delete your application?&quot;, :method =&gt; :delete %&gt;
 
 
-        &lt;% end %&gt;
-      &lt;% else %&gt;
+        &lt;% end %&gt;
+      &lt;% else %&gt;
 
         &lt;% if current_user.active == true %&gt;
 
            &lt;h2&gt;Want to apply?&lt;/h2&gt;
            &lt;p&gt;Write a message and hit apply (1000 character limit)
            &lt;% form_for @application do |f| -%&gt;
-             &lt;%= f.hidden_field :job_id %&gt;
+             &lt;%= f.hidden_field :job_id %&gt;
              &lt;%= f.text_area :message, :rows =&gt; 10, :cols =&gt; 60 %&gt;
-             &lt;p&gt;&lt;%= submit_tag 'Apply' %&gt;&lt;/p&gt;
-           &lt;% end %&gt;
+             &lt;p&gt;&lt;%= submit_tag 'Apply' %&gt;&lt;/p&gt;
+           &lt;% end %&gt;
 
         &lt;% end %&gt;
 
-      &lt;% end %&gt;
+      &lt;% end %&gt;
       
 
 
 
-    &lt;/div&gt;
+    &lt;/div&gt;
 
-    &lt;div id=&quot;show-stat&quot;&gt;
+    &lt;div id=&quot;show-stat&quot;&gt;
        &lt;%= stats_for @job, {:icons_side =&gt; &quot;left&quot;, :breakout =&gt; true} %&gt;
 
-    &lt;/div&gt;
+    &lt;/div&gt;
 &lt;/div&gt;
-
+
 &lt;% end %&gt;
 </diff>
      <filename>app/views/jobs/show.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 &lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
-&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
-  &lt;head&gt;
-    &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
+&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; xml:lang=&quot;en&quot; lang=&quot;en&quot;&gt;
+  &lt;head&gt;
+    &lt;meta http-equiv=&quot;Content-type&quot; content=&quot;text/html; charset=utf-8&quot; /&gt;
     &lt;title&gt;Commune2 | &lt;%= yield :title %&gt;&lt;/title&gt;
     &lt;%= stylesheet_link_tag 'style' %&gt;
 
@@ -10,8 +10,8 @@
  &lt;%= javascript_include_tag 'unitpngfix.js' %&gt;
 &lt;![endif]--&gt; 
 
-  &lt;/head&gt;
-  &lt;body&gt;
+  &lt;/head&gt;
+  &lt;body&gt;
 
 
         &lt;div id=&quot;site-container&quot;&gt;
@@ -49,7 +49,7 @@
 
             
             
-            &lt;% if logged_in? and request.path_parameters[:controller] != &quot;user&quot; %&gt;
+            &lt;% if logged_in? and request.path_parameters[:controller] != &quot;user&quot; %&gt;
 
                 &lt;td valign=&quot;top&quot; width=&quot;140&quot;&gt;
               
@@ -134,17 +134,17 @@
 
             &lt;div id=&quot;content&quot;&gt;
 
-              &lt;div id=&quot;system_message&quot;&gt;Please note that this website is still under test.  You can help us by playing with it!&lt;/div&gt;
+              &lt;div id=&quot;system_message&quot;&gt;Please note that this website is still under test.  You can help us by playing with it!&lt;/div&gt;
+
+               &lt;% unless flash[:error].blank? %&gt;
+                 &lt;div id=&quot;error&quot;&gt;&lt;%=h flash[:error] %&gt; &lt;/div&gt;
+               &lt;% end %&gt;
+               &lt;% unless flash[:notice].blank? %&gt;
+                  &lt;div id=&quot;notice&quot;&gt;&lt;%=h flash[:notice] %&gt; &lt;/div&gt;
+               &lt;% end %&gt;
 
-               &lt;% unless flash[:error].blank? %&gt;
-                 &lt;div id=&quot;error&quot;&gt;&lt;%=h flash[:error] %&gt; &lt;/div&gt;
-               &lt;% end %&gt;
-               &lt;% unless flash[:notice].blank? %&gt;
-                  &lt;div id=&quot;notice&quot;&gt;&lt;%=h flash[:notice] %&gt; &lt;/div&gt;
-               &lt;% end %&gt;
-
                       
-              &lt;%= yield %&gt;
+              &lt;%= yield %&gt;
 
             &lt;/div&gt;
 
@@ -157,7 +157,7 @@
           &lt;div id=&quot;disclaimer&quot;&gt;
             &lt;p&gt;&amp;copy; 2009 Commune2.com. A social networking enterprise.
             Owned by &lt;a href=http://www.bisonpeak.com&gt;Bison Peak Corporation&lt;/a&gt;.  All rights reserved.&lt;/p&gt;
-          &lt;/div&gt;
+          &lt;/div&gt;
 
 
           &lt;/td&gt;
@@ -179,7 +179,7 @@
         } catch(err) {}
       &lt;/script&gt;
 
-  &lt;/body&gt;
-&lt;/html&gt;
-
+  &lt;/body&gt;
+&lt;/html&gt;
+
 &lt;% flash.discard %&gt;</diff>
      <filename>app/views/layouts/application.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -18,7 +18,7 @@
       &lt;td valign=&quot;top&quot;&gt;&lt;h2&gt;Message&lt;/h2&gt;&lt;/td&gt;
       &lt;td&gt;&lt;p&gt;&lt;%= f.text_area :body, :rows =&gt; 6, :style =&gt; &quot;width: 100%&quot; %&gt;&lt;/p&gt;
       
-        &lt;p&gt;&lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;&lt;p&gt;
+        &lt;p&gt;&lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;&lt;p&gt;
 
       &lt;/td&gt;
     &lt;/tr&gt;</diff>
      <filename>app/views/messages/new.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/projects/_project.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,27 +1,27 @@
 &lt;% content_for :title do %&gt;Editing Project&lt;% end %&gt;
 
 
-&lt;h1&gt;Edit Project&lt;/h1&gt;
+&lt;h1&gt;Edit Project&lt;/h1&gt;
 &lt;p&gt;&lt;%= link_to &quot;Exit edit&quot;, project_path(:id =&gt; @project) %&gt;&lt;/p&gt;
 
-&lt;%= error_messages_for :project %&gt;
-
-&lt;div id=&quot;post&quot;&gt;
-
- &lt;% form_for @project do |f| -%&gt;
-
-     &lt;p&gt;Is this project active or inactive?
-       &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
-       &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
-       &lt;i&gt;Details of inactive projects (project page) only visible to project members.&lt;/i&gt;&lt;/p&gt;
-
-
-      &lt;p&gt;&lt;%= label_tag 'Project title' %&gt;&lt;br/&gt;
-      &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
-
-      &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
-      &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot;%&gt;&lt;/p&gt;
-
+&lt;%= error_messages_for :project %&gt;
+
+&lt;div id=&quot;post&quot;&gt;
+
+ &lt;% form_for @project do |f| -%&gt;
+
+     &lt;p&gt;Is this project active or inactive?
+       &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
+       &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
+       &lt;i&gt;Details of inactive projects (project page) only visible to project members.&lt;/i&gt;&lt;/p&gt;
+
+
+      &lt;p&gt;&lt;%= label_tag 'Project title' %&gt;&lt;br/&gt;
+      &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+      &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
+      &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot;%&gt;&lt;/p&gt;
+
 
       &lt;p&gt;Select relevant industries (no more than 5 please)&lt;/p&gt;
       &lt;%= render :partial =&gt; '/shared/industries', :locals =&gt; { :industry_ids =&gt; @industry_ids } %&gt;
@@ -40,7 +40,7 @@
 
         &lt;a href=&quot;http://hobix.com/textile/quick.html&quot; target=&quot;_blank&quot;&gt;Click here for detailed wiki synthax reference guide&lt;/a&gt;.
                  
-         &lt;p&gt;&lt;%= f.text_area :wiki, :rows =&gt; 25, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;    
-      &lt;p&gt;&lt;%= submit_tag &quot;Update&quot; %&gt;&lt;/p&gt;
-      &lt;% end %&gt;
-&lt;/div&gt;
+         &lt;p&gt;&lt;%= f.text_area :wiki, :rows =&gt; 25, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;    
+      &lt;p&gt;&lt;%= submit_tag &quot;Update&quot; %&gt;&lt;/p&gt;
+      &lt;% end %&gt;
+&lt;/div&gt;</diff>
      <filename>app/views/projects/edit.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/projects/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 &lt;% content_for :title do %&gt;My Projects&lt;% end %&gt;
-
+
 &lt;% if flash[:new_job] %&gt;
   &lt;div id=&quot;detailed_notice&quot;&gt;
     &lt;h2&gt;To post a job:&lt;/h2&gt;
@@ -12,20 +12,20 @@
 
   &lt;/div&gt;
 &lt;% end %&gt;
-
-
-&lt;% if @projects.blank? %&gt;
+
+
+&lt;% if @projects.blank? %&gt;
 
   &lt;% unless flash[:new_job] %&gt;
     &lt;h1&gt;Working on something?&lt;/h1&gt;
-    &lt;p&gt; You have not posted any projects yet.  Click &lt;%= link_to 'here', new_project_path %&gt; if you would like to post your first.&lt;/p&gt;
+    &lt;p&gt; You have not posted any projects yet.  Click &lt;%= link_to 'here', new_project_path %&gt; if you would like to post your first.&lt;/p&gt;
   &lt;% end %&gt;
 
-&lt;% else %&gt;
+&lt;% else %&gt;
   &lt;h1&gt;My Projects&lt;/h1&gt;
-  &lt;%= render :partial =&gt; @projects %&gt;
-&lt;% end %&gt;
-
+  &lt;%= render :partial =&gt; @projects %&gt;
+&lt;% end %&gt;
+
 &lt;%= will_paginate @projects %&gt;
 
 </diff>
      <filename>app/views/projects/my_projects.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -4,38 +4,38 @@
 &lt;tr&gt;
   &lt;td width=&quot;70%&quot; valign=&quot;top&quot;&gt;  
 
-     &lt;h1&gt;New Project&lt;/h1&gt;
-      &lt;%= error_messages_for :project %&gt;
-
-      &lt;div id=&quot;post&quot;&gt;
-
-      &lt;% form_for :project, :url =&gt; projects_path do |f| -%&gt;
-
-      &lt;% if @idea %&gt;
-        This project is being spawned off of the &quot;&lt;%= link_to @idea.title, idea_path(:id =&gt; @idea) %&gt;&quot; idea.
-        &lt;%= f.hidden_field :idea_id, :value =&gt; @idea.id %&gt;
-      &lt;% end %&gt;
-
-         &lt;p&gt;Is this project active or inactive?
-           &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
-           &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
-           &lt;i&gt;Only active projects can be viewed by others, including from any jobs posts.&lt;/i&gt;&lt;/p&gt;
-
-
-          &lt;p&gt;&lt;%= label_tag 'Project title' %&gt;&lt;br/&gt;
-          &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
-
-          &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
-          &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
-
+     &lt;h1&gt;New Project&lt;/h1&gt;
+      &lt;%= error_messages_for :project %&gt;
+
+      &lt;div id=&quot;post&quot;&gt;
+
+      &lt;% form_for :project, :url =&gt; projects_path do |f| -%&gt;
+
+      &lt;% if @idea %&gt;
+        This project is being spawned off of the &quot;&lt;%= link_to @idea.title, idea_path(:id =&gt; @idea) %&gt;&quot; idea.
+        &lt;%= f.hidden_field :idea_id, :value =&gt; @idea.id %&gt;
+      &lt;% end %&gt;
+
+         &lt;p&gt;Is this project active or inactive?
+           &lt;%= f.radio_button :active, &quot;true&quot;, :checked =&gt; true %&gt;Active
+           &lt;%= f.radio_button :active, &quot;false&quot; %&gt;Inactive &lt;br /&gt;
+           &lt;i&gt;Only active projects can be viewed by others, including from any jobs posts.&lt;/i&gt;&lt;/p&gt;
+
+
+          &lt;p&gt;&lt;%= label_tag 'Project title' %&gt;&lt;br/&gt;
+          &lt;%= f.text_field :title, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
+          &lt;p&gt;&lt;%= label_tag 'Description' %&gt;&lt;br/&gt;
+          &lt;%= f.text_area :description, :rows =&gt; 10, :style=&gt;&quot;width:600px;&quot; %&gt;&lt;/p&gt;
+
 
           &lt;p&gt;Select relevant industries (no more than 5 please)&lt;%= &quot;, &lt;i&gt;&quot; + pluralize(@industry_ids.size, &quot;industry&quot;) + &quot; &quot; + @message + &quot;&lt;/i&gt;&quot; unless @message.blank? %&gt;&lt;/p&gt;
 
           &lt;%= render :partial =&gt; '/shared/industries', :locals =&gt; { :industry_ids =&gt; @industry_ids } %&gt;
-
-          &lt;p&gt;&lt;%= submit_tag &quot;Create Project&quot; %&gt;&lt;/p&gt;
-          &lt;% end %&gt;
-      &lt;/div&gt;
+
+          &lt;p&gt;&lt;%= submit_tag &quot;Create Project&quot; %&gt;&lt;/p&gt;
+          &lt;% end %&gt;
+      &lt;/div&gt;
   &lt;/td&gt;
   &lt;td valign=&quot;top&quot; align=&quot;center&quot;&gt;
     &lt;table border=&quot;0&quot; width=&quot;90%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot; align=&quot;center&quot;&gt;</diff>
      <filename>app/views/projects/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 &lt;% content_for :title do %&gt;Project &lt;% end %&gt;
-
-&lt;% if @project.blank? %&gt;
-  &lt;p&gt;Sorry, no project to see here.&lt;/p&gt;
 
-&lt;% else %&gt;
+&lt;% if @project.blank? %&gt;
+  &lt;p&gt;Sorry, no project to see here.&lt;/p&gt;
+
+&lt;% else %&gt;
 
 
   &lt;div id=&quot;show-container&quot;&gt;
@@ -22,21 +22,21 @@
       &lt;% end %&gt;
       
       &lt;%= render :partial =&gt; '/shared/watchlist_menu', :locals =&gt; { :object =&gt; @project}  %&gt;
-
+
       &lt;%= button_to_delete_if_allowed @project %&gt;
 
     &lt;/div&gt;
 
     &lt;div id=&quot;show-main-container&quot;&gt;
-    
+    
       &lt;h1&gt;&lt;%= image_tag(&quot;/images/other_icons/watched_item_icon_yellow.png&quot;, :border =&gt; 0, :title =&gt; &quot;On Watchlist&quot;) if current_user.watched_projects.include?(@project) %&gt;
-        &lt;%=h @project.title %&gt;&lt;/h1&gt;
+        &lt;%=h @project.title %&gt;&lt;/h1&gt;
 
-      &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @project}  %&gt;
+      &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @project}  %&gt;
 
-      &lt;% if @project.idea %&gt;
-        &lt;p&gt;&lt;b&gt;This project was spawned from the &quot;&lt;%= link_to h(@project.idea.title), idea_path(:id =&gt; @project.idea) %&gt;&quot; idea.&lt;/b&gt;&lt;/p&gt;
-      &lt;% end %&gt;
+      &lt;% if @project.idea %&gt;
+        &lt;p&gt;&lt;b&gt;This project was spawned from the &quot;&lt;%= link_to h(@project.idea.title), idea_path(:id =&gt; @project.idea) %&gt;&quot; idea.&lt;/b&gt;&lt;/p&gt;
+      &lt;% end %&gt;
 
       &lt;p&gt;Relevant industries: &lt;%= @project.industries_string %&gt;&lt;/p&gt;
       
@@ -46,11 +46,11 @@
           | Updated: &lt;%= time_ago_in_words(@project.updated_at) %&gt; ago
         &lt;% end %&gt;  
         &lt;br /&gt;
-      &lt;/p&gt;
+      &lt;/p&gt;
 
-      &lt;hr /&gt;
+      &lt;hr /&gt;
 
-      &lt;p&gt;&lt;b&gt;Details&lt;/b&gt;&lt;br /&gt;&lt;%= simple_format(strip_tags(@project.description)) %&gt;&lt;/p&gt;
+      &lt;p&gt;&lt;b&gt;Details&lt;/b&gt;&lt;br /&gt;&lt;%= simple_format(strip_tags(@project.description)) %&gt;&lt;/p&gt;
 
       &lt;% if @project.wiki and @project.wiki != &quot;&quot; %&gt;
         &lt;h2&gt;Mini Wiki&lt;/h2&gt;
@@ -85,32 +85,32 @@
             &lt;%= image_tag(&quot;other_icons/comment_icon_sm.png&quot;, :border =&gt;&quot;0&quot;) %&gt;
           &lt;/td&gt;
           &lt;td valign=&quot;center&quot;&gt;
-            &lt;%= pluralize @project.scorecard.total_comments_count, &quot;Comment&quot; %&gt;
+            &lt;%= pluralize @project.scorecard.total_comments_count, &quot;Comment&quot; %&gt;
           &lt;/td&gt;
         &lt;/tr&gt;
       &lt;/table&gt;
 
-      &lt;%= render :partial =&gt; @project.comments %&gt;
+      &lt;%= render :partial =&gt; @project.comments %&gt;
 
       &lt;div id=&quot;postcomment&quot;&gt;
-        &lt;h2&gt;New Comment&lt;/h2&gt;
-      
-        &lt;% form_tag post_project_comment_path do -%&gt;
-              &lt;%= text_area_tag 'newcomment', @comment, :rows =&gt; 10, :cols =&gt; 38 %&gt;
-               &lt;%= hidden_field_tag 'project', @project.id %&gt;
-              &lt;p&gt;&lt;%= submit_tag 'Post Comment' %&gt;&lt;/p&gt;
-              &lt;% end %&gt;
-      &lt;/div&gt;
+        &lt;h2&gt;New Comment&lt;/h2&gt;
+      
+        &lt;% form_tag post_project_comment_path do -%&gt;
+              &lt;%= text_area_tag 'newcomment', @comment, :rows =&gt; 10, :cols =&gt; 38 %&gt;
+               &lt;%= hidden_field_tag 'project', @project.id %&gt;
+              &lt;p&gt;&lt;%= submit_tag 'Post Comment' %&gt;&lt;/p&gt;
+              &lt;% end %&gt;
+      &lt;/div&gt;
 
 
-    &lt;/div&gt;
+    &lt;/div&gt;
 
-    &lt;div id=&quot;show-stat&quot;&gt;      
+    &lt;div id=&quot;show-stat&quot;&gt;      
         &lt;%= stats_for @project, {:icons_side =&gt; &quot;left&quot;, :breakout =&gt; true} %&gt;
     &lt;/div&gt;            
-
-  &lt;/div&gt;
 
-
+  &lt;/div&gt;
+
+
 &lt;% end %&gt;
 </diff>
      <filename>app/views/projects/show.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/searches/index.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/sessions/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-
+
   &lt;h2&gt;Are you human?&lt;/h2&gt;
-         &lt;%= recaptcha_tags(:display =&gt; {:theme =&gt; 'red'}) %&gt;
+         &lt;%= recaptcha_tags(:display =&gt; {:theme =&gt; 'red'}) %&gt;
 </diff>
      <filename>app/views/shared/_reCAPTCHA.html.erb</filename>
    </modified>
    <modified>
      <filename>app/views/user/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
-&lt;%=h @user.login %&gt;, your account has been activated.  Welcome aboard!
-
-  &lt;%=h @url %&gt;
-
+&lt;%=h @user.login %&gt;, your account has been activated.  Welcome aboard!
+
+  &lt;%=h @url %&gt;
+
 (Do not reply to this email address)
\ No newline at end of file</diff>
      <filename>app/views/user_mailer/activation.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
-You are getting this email because you told us you forgot your password.
-
-The link below will allow you to change your password.
-
-&lt;%=h @url %&gt;
-
+You are getting this email because you told us you forgot your password.
+
+The link below will allow you to change your password.
+
+&lt;%=h @url %&gt;
+
 (Do not reply to this email address)
\ No newline at end of file</diff>
      <filename>app/views/user_mailer/forgot_password.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
-&lt;%=h @who %&gt; has sent you a message.  See below.
-
-&lt;%=h @message %&gt;
-
-&lt;%=h @url %&gt;
+&lt;%=h @who %&gt; has sent you a message.  See below.
+
+&lt;%=h @message %&gt;
+
+&lt;%=h @url %&gt;</diff>
      <filename>app/views/user_mailer/general.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-&lt;%=h @who %&gt; has sent you a message through Commune2. You can view this person's profile here: &lt;%= user_url(@profile) %&gt;
+&lt;%=h @who %&gt; has sent you a message through Commune2. You can view this person's profile here: &lt;%= user_url(@profile) %&gt;
 
 NOTE: Your email address was not revealed to &lt;%=h @who %&gt; by sending this email.  However, if you reply you WILL reveal your email address.  Do not reply unless you are comfortable revealing your email address.
 </diff>
      <filename>app/views/user_mailer/message.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
-The following is a copy of the non-disclosure agreement electronically signed by &lt;%=h @nda.first_name %&gt; &lt;%=h @nda.last_name %&gt;.
-
-This needs to be signed and mailed (or faxed).
-
-A copy is also available on &lt;%=h @url %&gt;
-
-= = =
-
-&lt;%=h strip_tags(sanitize(@nda.agreement)) %&gt;
+The following is a copy of the non-disclosure agreement electronically signed by &lt;%=h @nda.first_name %&gt; &lt;%=h @nda.last_name %&gt;.
+
+This needs to be signed and mailed (or faxed).
+
+A copy is also available on &lt;%=h @url %&gt;
+
+= = =
+
+&lt;%=h strip_tags(sanitize(@nda.agreement)) %&gt;</diff>
      <filename>app/views/user_mailer/nda.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
-Your account has been created.
-
-  Username: &lt;%=h @user.login %&gt;
-
-Please visit this url to activate your account:
-&lt;%=h @url %&gt;
-
+Your account has been created.
+
+  Username: &lt;%=h @user.login %&gt;
+
+Please visit this url to activate your account:
+&lt;%=h @url %&gt;
+
 (Do not reply to this email address)</diff>
      <filename>app/views/user_mailer/signup_notification.erb</filename>
    </modified>
    <modified>
      <filename>app/views/users/_user.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,14 @@
-
-
-    &lt;h1&gt;Account&lt;/h1&gt;
-    &lt;p&gt;Login name: &lt;i&gt;&lt;%= current_user.login %&gt;&lt;/i&gt;&lt;/p&gt;
-    &lt;p&gt;Email: &lt;i&gt;&lt;%= current_user.email %&gt;&lt;/i&gt;&lt;/p&gt;
-
-
-    &lt;p&gt;Want to change your password?  Do it &lt;%= link_to &quot;here&quot;, change_password_path %&gt;.
-
-
-    &lt;% @nda = Nda.find_by_account_id(current_user.id) %&gt;
+
+
+    &lt;h1&gt;Account&lt;/h1&gt;
+    &lt;p&gt;Login name: &lt;i&gt;&lt;%= current_user.login %&gt;&lt;/i&gt;&lt;/p&gt;
+    &lt;p&gt;Email: &lt;i&gt;&lt;%= current_user.email %&gt;&lt;/i&gt;&lt;/p&gt;
+
+
+    &lt;p&gt;Want to change your password?  Do it &lt;%= link_to &quot;here&quot;, change_password_path %&gt;.
+
+
+    &lt;% @nda = Nda.find_by_account_id(current_user.id) %&gt;
     &lt;% if @nda %&gt;
       &lt;div id=&quot;nda_show&quot;&gt;&lt;p&gt;You have submitted an electornic non-disclosure agreement.  It is currently binding, but you if have not done so already, you need to print and sign it.  Click &lt;%= link_to &quot;here&quot;, nda_show_path %&gt; to see this agreement.&lt;/p&gt;&lt;/div&gt;
     &lt;% end %&gt;</diff>
      <filename>app/views/users/account.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,8 +1,8 @@
-
-
-&lt;h1&gt;Profiles&lt;/h1&gt;
+
+
+&lt;h1&gt;Profiles&lt;/h1&gt;
 &lt;% if params[:search] %&gt;&lt;h2&gt;Search Criteria: &lt;%= params[:search] %&gt;&lt;/h2&gt;&lt;% end %&gt;
-
-&lt;%= render :partial =&gt; 'profile_snippet' %&gt;
-
+
+&lt;%= render :partial =&gt; 'profile_snippet' %&gt;
+
 &lt;%= will_paginate @profiles %&gt;</diff>
      <filename>app/views/users/browse.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,21 @@
 &lt;% content_for :title do %&gt;Change Password&lt;% end %&gt;
-
-    &lt;h1&gt;Change your password&lt;/h1&gt;
-     &lt;%= error_messages_for :current_user %&gt;
-&lt;% form_tag change_password_path do -%&gt;
-       &lt;p&gt;&lt;%= label_tag 'New password' %&gt;&lt;br /&gt;
-       &lt;%= password_field 'password', nil %&gt;&lt;/p&gt;
-
-       &lt;p&gt;&lt;%= label_tag 'Confirm new password' %&gt;&lt;br /&gt;
-       &lt;%= password_field 'password_confirmation', nil %&gt;&lt;/p&gt;
-
-       &lt;p&gt;&lt;%= label_tag 'current password (the one you want to change)' %&gt;&lt;br /&gt;
-       &lt;%= password_field 'old_password', nil %&gt;&lt;/p&gt;
-
-     &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
-
-  &lt;p&gt;&lt;%= submit_tag 'Change!' %&gt;&lt;/p&gt;
-
-&lt;% end -%&gt;
-
+
+    &lt;h1&gt;Change your password&lt;/h1&gt;
+     &lt;%= error_messages_for :current_user %&gt;
+&lt;% form_tag change_password_path do -%&gt;
+       &lt;p&gt;&lt;%= label_tag 'New password' %&gt;&lt;br /&gt;
+       &lt;%= password_field 'password', nil %&gt;&lt;/p&gt;
+
+       &lt;p&gt;&lt;%= label_tag 'Confirm new password' %&gt;&lt;br /&gt;
+       &lt;%= password_field 'password_confirmation', nil %&gt;&lt;/p&gt;
+
+       &lt;p&gt;&lt;%= label_tag 'current password (the one you want to change)' %&gt;&lt;br /&gt;
+       &lt;%= password_field 'old_password', nil %&gt;&lt;/p&gt;
+
+     &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
+
+  &lt;p&gt;&lt;%= submit_tag 'Change!' %&gt;&lt;/p&gt;
+
+&lt;% end -%&gt;
+
 </diff>
      <filename>app/views/users/change_password.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,21 +1,21 @@
 &lt;% content_for :title do %&gt;Delete Account&lt;% end %&gt;
-
-    &lt;h1&gt;Are you sure you want to delete your account?&lt;/h1&gt;
 
-      &lt;%= error_messages_for :current_user %&gt;
-    &lt;p&gt;We are sorry to see you go.  To delete your account, please enter your password.&lt;/p&gt;
-&lt;% form_tag delete_account_path do -%&gt;
- 
-       &lt;p&gt;&lt;%= label_tag 'Password' %&gt;&lt;br /&gt;
+    &lt;h1&gt;Are you sure you want to delete your account?&lt;/h1&gt;
 
-       &lt;%= password_field 'password', nil %&gt;&lt;/p&gt;
+      &lt;%= error_messages_for :current_user %&gt;
+    &lt;p&gt;We are sorry to see you go.  To delete your account, please enter your password.&lt;/p&gt;
+&lt;% form_tag delete_account_path do -%&gt;
+ 
+       &lt;p&gt;&lt;%= label_tag 'Password' %&gt;&lt;br /&gt;
 
-&lt;br /&gt;&lt;br /&gt;
-     &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
+       &lt;%= password_field 'password', nil %&gt;&lt;/p&gt;
 
 &lt;br /&gt;&lt;br /&gt;
-&lt;h2&gt;You will not be able to undo this action...&lt;/h2&gt;
-  &lt;p&gt;&lt;%= submit_tag 'DELETE MY ACCOUNT' %&gt;&lt;/p&gt;
-
-&lt;% end -%&gt;
+     &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
+
+&lt;br /&gt;&lt;br /&gt;
+&lt;h2&gt;You will not be able to undo this action...&lt;/h2&gt;
+  &lt;p&gt;&lt;%= submit_tag 'DELETE MY ACCOUNT' %&gt;&lt;/p&gt;
+
+&lt;% end -%&gt;
 </diff>
      <filename>app/views/users/delete_account.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -5,10 +5,10 @@
 
   &lt;h1&gt;My Profile and Account&lt;/h1&gt;
   &lt;p&gt;&lt;%= link_to 'Click here', user_path(current_user) %&gt; to see how other people see your profile.&lt;/p&gt;
-  &lt;p&gt;Your rating: &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @user} %&gt;&lt;/p&gt;
+  &lt;p&gt;Your rating: &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @user} %&gt;&lt;/p&gt;
 
     
-
+
   &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;Profile (public information)&lt;/h2&gt;&lt;/div&gt;
   
     
@@ -30,7 +30,7 @@
 
           &lt;%= render :partial =&gt; '/shared/add_location' %&gt;
           
-          &lt;br /&gt;&lt;br /&gt;
+          &lt;br /&gt;&lt;br /&gt;
       
         &lt;/td&gt;
       &lt;/tr&gt;
@@ -111,10 +111,10 @@
 
       &lt;%= submit_tag 'Save Changes &amp; Update Profile' %&gt;&lt;/td&gt;&lt;/tr&gt;
 
-    &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;p&gt;Want to change your password?  Do it &lt;%= link_to &quot;here&quot;, change_password_path %&gt; (any changes you made above would not be saved).&lt;/td&gt;&lt;/tr&gt;
+    &lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&lt;p&gt;Want to change your password?  Do it &lt;%= link_to &quot;here&quot;, change_password_path %&gt; (any changes you made above would not be saved).&lt;/td&gt;&lt;/tr&gt;
 
     &lt;/table&gt;
 
     
-  &lt;% end %&gt;       
+  &lt;% end %&gt;       
 </diff>
      <filename>app/views/users/edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,24 @@
 &lt;% content_for :title do %&gt;Reset Password&lt;% end %&gt;
-
-
-
-    &lt;h1&gt;Forgot your password?&lt;/h1&gt;
-
+
+
+
+    &lt;h1&gt;Forgot your password?&lt;/h1&gt;
+
     &lt;p&gt;Enter your email address and we will help you reset your password.&lt;/p&gt;
-    
-&lt;% form_tag forgot_password_path do -%&gt;
+    
+&lt;% form_tag forgot_password_path do -%&gt;
 
 &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
   &lt;tr&gt;
     &lt;td valign=&quot;top&quot; width=&quot;250&quot;&gt;
-      &lt;h2&gt;Email&lt;/h2&gt;
-      &lt;%= text_field_tag 'email', @email%&gt;
+      &lt;h2&gt;Email&lt;/h2&gt;
+      &lt;%= text_field_tag 'email', @email%&gt;
     &lt;/td&gt;
     &lt;td valign=&quot;top&quot;&gt;
       &lt;h2&gt;Are you human?&lt;/h2&gt;
-      &lt;%= recaptcha_tags(:display =&gt; {:theme =&gt; 'red'}) %&gt;
+      &lt;%= recaptcha_tags(:display =&gt; {:theme =&gt; 'red'}) %&gt;
   &lt;br /&gt;
-  &lt;%= submit_tag 'Help!', :class =&gt; &quot;big_button&quot; %&gt;
+  &lt;%= submit_tag 'Help!', :class =&gt; &quot;big_button&quot; %&gt;
 
     &lt;/td&gt;
   &lt;/tr&gt;
@@ -26,5 +26,5 @@
   &lt;p&gt;
   &lt;%= link_to &quot;Login&quot;, login_path %&gt;&lt;br /&gt;
   &lt;%= link_to &quot;Register&quot;, new_user_path %&gt;
-  &lt;/p&gt;
-&lt;% end -%&gt;
+  &lt;/p&gt;
+&lt;% end -%&gt;</diff>
      <filename>app/views/users/forgot_password.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 
 &lt;% content_for :title do %&gt;People&lt;% end %&gt;
-
+
 &lt;table border=&quot;0&quot; width=&quot;100%&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;
 &lt;tr&gt;
   &lt;td width=&quot;70%&quot; valign=&quot;top&quot;&gt;  
@@ -11,9 +11,9 @@
     &lt;% end %&gt;
 
     &lt;% if params[:search] %&gt;&lt;h2&gt;Search Criteria: &lt;%=h params[:search] %&gt;&lt;/h2&gt;&lt;% end %&gt;
-
-    &lt;%= render :partial =&gt; @profiles %&gt;
-
+
+    &lt;%= render :partial =&gt; @profiles %&gt;
+
     &lt;%= will_paginate @profiles %&gt;
     
 &lt;/td&gt;</diff>
      <filename>app/views/users/index.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,36 +1,36 @@
 &lt;% content_for :title do %&gt;New Account&lt;% end %&gt;
 
-&lt;% flash[:notice] = &quot;Registration by invitation only.&quot; %&gt;
+&lt;% flash[:notice] = &quot;Registration by invitation only.&quot; %&gt;
+
 
-
 &lt;%= error_messages_for :user, :header_message =&gt; &quot;Could not create account&quot; %&gt;
-
-&lt;h1&gt;Registration&lt;/h1&gt;
-&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; If you are registered and just need to log in, please go &lt;%= link_to &quot;here&quot;, login_path %&gt;.&lt;/p&gt;
+
+&lt;h1&gt;Registration&lt;/h1&gt;
+&lt;p&gt;&lt;b&gt;NOTE:&lt;/b&gt; If you are registered and just need to log in, please go &lt;%= link_to &quot;here&quot;, login_path %&gt;.&lt;/p&gt;
 
     &lt;div id=&quot;show-main-container&quot;&gt;
 
 &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;Basic account Information&lt;/h2&gt;&lt;/div&gt;
 
   &lt;p&gt;You will be able to add a lot more to your profile once you activate your account.&lt;/p&gt;
-
-  &lt;% form_for @user do |f| -%&gt;
 
+  &lt;% form_for @user do |f| -%&gt;
+
+
+    &lt;p&gt;&lt;%= label_tag 'login (username)' %&gt;&lt;br/&gt;
+    &lt;%= f.text_field :login, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
 
-    &lt;p&gt;&lt;%= label_tag 'login (username)' %&gt;&lt;br/&gt;
-    &lt;%= f.text_field :login, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
-
-    &lt;p&gt;&lt;%= label_tag 'email' %&gt;&lt;br/&gt;
-    &lt;%= f.text_field :email, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
+    &lt;p&gt;&lt;%= label_tag 'email' %&gt;&lt;br/&gt;
+    &lt;%= f.text_field :email, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
 
 
-    &lt;%= render :partial =&gt; '/shared/add_location' %&gt;
-
-    &lt;p&gt;&lt;%= label_tag 'password' %&gt; (CaSe SeNsitIvE)&lt;br/&gt;
-    &lt;%= f.password_field :password, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
-
-    &lt;p&gt;&lt;%= label_tag 'password_confirmation', 'Confirm Password' %&gt; (CaSe SeNsitIvE)&lt;br/&gt;
-    &lt;%= f.password_field :password_confirmation, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
+    &lt;%= render :partial =&gt; '/shared/add_location' %&gt;
+
+    &lt;p&gt;&lt;%= label_tag 'password' %&gt; (CaSe SeNsitIvE)&lt;br/&gt;
+    &lt;%= f.password_field :password, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
+
+    &lt;p&gt;&lt;%= label_tag 'password_confirmation', 'Confirm Password' %&gt; (CaSe SeNsitIvE)&lt;br/&gt;
+    &lt;%= f.password_field :password_confirmation, :style=&gt;&quot;width:300px;&quot; %&gt;&lt;/p&gt;
 
     &lt;p&gt;&amp;nbsp;&lt;/p&gt;
 
@@ -65,12 +65,12 @@
 &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;Almost there...&lt;/h2&gt;&lt;/div&gt;
 
 &lt;p&gt;...just checking to make sure you're not a spambot.&lt;/p&gt;
-
-    &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
+
+    &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
 
     &lt;p&gt;&amp;nbsp;&lt;/p&gt;
-    
-    &lt;p&gt;&lt;%= submit_tag 'Register', :class=&gt;&quot;big_button&quot; %&gt;&lt;/p&gt;
-  &lt;% end -%&gt;
-
+    
+    &lt;p&gt;&lt;%= submit_tag 'Register', :class=&gt;&quot;big_button&quot; %&gt;&lt;/p&gt;
+  &lt;% end -%&gt;
+
 &lt;/div&gt;</diff>
      <filename>app/views/users/new.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,22 +1,22 @@
 &lt;% content_for :title do %&gt;Reset Password&lt;% end %&gt;
-
-      &lt;h1&gt;Reset Your Password&lt;/h1&gt;
-      &lt;% @user.password = @user.password_confirmation = nil %&gt;
-
-     &lt;% form_for :user, :url =&gt; reset_password_path do |f| -%&gt;
-
-      &lt;p&gt;&lt;%= label_tag 'new_password', 'New Password' %&gt; (CaSe SeNsAtIvE)&lt;br/&gt;
-      &lt;%= f.password_field :password %&gt;&lt;/p&gt;
-
-      &lt;p&gt;&lt;%= label_tag 'password_confirmation', 'Confirm Password' %&gt; (CaSe SeNsAtIvE)&lt;br/&gt;
-      &lt;%= f.password_field :password_confirmation %&gt;&lt;/p&gt;
-
-      
-     &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
-
-      &lt;p&gt;&lt;%= submit_tag 'Reset password' %&gt;&lt;/p&gt;
-      &lt;% end -%&gt;
-
-    &lt;/td&gt;
-    &lt;td valign=&quot;top&quot;&gt;
-      &lt;%= error_messages_for :user %&gt;
+
+      &lt;h1&gt;Reset Your Password&lt;/h1&gt;
+      &lt;% @user.password = @user.password_confirmation = nil %&gt;
+
+     &lt;% form_for :user, :url =&gt; reset_password_path do |f| -%&gt;
+
+      &lt;p&gt;&lt;%= label_tag 'new_password', 'New Password' %&gt; (CaSe SeNsAtIvE)&lt;br/&gt;
+      &lt;%= f.password_field :password %&gt;&lt;/p&gt;
+
+      &lt;p&gt;&lt;%= label_tag 'password_confirmation', 'Confirm Password' %&gt; (CaSe SeNsAtIvE)&lt;br/&gt;
+      &lt;%= f.password_field :password_confirmation %&gt;&lt;/p&gt;
+
+      
+     &lt;%= render :partial =&gt; '/shared/reCAPTCHA' %&gt;
+
+      &lt;p&gt;&lt;%= submit_tag 'Reset password' %&gt;&lt;/p&gt;
+      &lt;% end -%&gt;
+
+    &lt;/td&gt;
+    &lt;td valign=&quot;top&quot;&gt;
+      &lt;%= error_messages_for :user %&gt;</diff>
      <filename>app/views/users/reset_password.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -1,9 +1,9 @@
 &lt;% content_for :title do %&gt;Person &lt;% end %&gt;
-
-&lt;% if @user.blank? %&gt;
-  &lt;p&gt;Sorry, no one to see here.&lt;/p&gt;
 
-&lt;% else %&gt;
+&lt;% if @user.blank? %&gt;
+  &lt;p&gt;Sorry, no one to see here.&lt;/p&gt;
+
+&lt;% else %&gt;
 
 
   &lt;div id=&quot;show-container&quot;&gt;
@@ -26,7 +26,7 @@
     &lt;/div&gt;
 
     &lt;div id=&quot;show-main-container&quot;&gt;
-    
+    
       &lt;h1&gt;&lt;%= image_tag(&quot;/images/other_icons/watched_item_icon_yellow.png&quot;, :border =&gt; 0, :title =&gt; &quot;On Watchlist&quot;) if current_user.watched_people.include?(@user) %&gt;
         &lt;%=h @user.login %&gt;&lt;/h1&gt;
         
@@ -35,7 +35,7 @@
           &lt;br /&gt;&lt;br /&gt;
         &lt;% end %&gt;
 
-        &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @user}  %&gt;
+        &lt;%= render :partial =&gt; '/shared/stars', :locals =&gt; { :scorable =&gt; @user}  %&gt;
 
         &lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpading=&quot;0&quot; width=&quot;100%&quot;&gt;
           &lt;tr&gt;&lt;td valign=&quot;top&quot; width=&quot;50%&quot;&gt;
@@ -84,21 +84,21 @@
       &lt;% if @user.experience and @user.experience != &quot;&quot; %&gt;&lt;p&gt;&lt;b&gt;Experience:&lt;/b&gt;&lt;br /&gt;&lt;%= simple_format(strip_tags(@user.experience)) %&gt;&lt;/p&gt;&lt;% end %&gt;
 
       &lt;% if @user.education and @user.education != &quot;&quot; %&gt;&lt;p&gt;&lt;b&gt;Education:&lt;/b&gt;&lt;br /&gt;&lt;%= simple_format(strip_tags(@user.education)) %&gt;&lt;/p&gt;&lt;% end %&gt;
-
-      &lt;p&gt;Joined &lt;%= time_ago_in_words(@user.created_at) %&gt; ago&lt;/p&gt;
+
+      &lt;p&gt;Joined &lt;%= time_ago_in_words(@user.created_at) %&gt; ago&lt;/p&gt;
 
 
       &lt;div id=&quot;white-divider&quot;&gt;&amp;nbsp;&lt;/div&gt;
 
 
       &lt;% ideas_count = @user.active_ideas.count %&gt;
-      &lt;% if ideas_count &gt; 0 %&gt;
+      &lt;% if ideas_count &gt; 0 %&gt;
         &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;&lt;%= pluralize ideas_count, 'Active Idea' %&gt;&lt;/h2&gt;&lt;/div&gt;
-        &lt;%= render :partial =&gt; @user.active_ideas %&gt;
-      &lt;% end %&gt;
+        &lt;%= render :partial =&gt; @user.active_ideas %&gt;
+      &lt;% end %&gt;
 
       &lt;% positions_count = @user.active_positions.count %&gt;
-      &lt;% if positions_count &gt; 0 %&gt;
+      &lt;% if positions_count &gt; 0 %&gt;
         &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;&lt;%= pluralize positions_count, 'Active Position' %&gt;&lt;/h2&gt;&lt;/div&gt;
 
         &lt;% @user.active_positions.each do |position| %&gt;
@@ -110,23 +110,23 @@
 
       &lt;% end %&gt;
 
-      &lt;% job_count = @user.open_job_postings.count %&gt;
-      &lt;% if job_count &gt; 0 %&gt;
+      &lt;% job_count = @user.open_job_postings.count %&gt;
+      &lt;% if job_count &gt; 0 %&gt;
         &lt;div id=&quot;section_header&quot;&gt;&lt;h2&gt;&amp;nbsp;&lt;%= pluralize job_count, 'Open Job' %&gt;&lt;/h2&gt;&lt;/div&gt;
-        &lt;%= render :partial =&gt; @user.open_job_postings %&gt;
-      &lt;% end %&gt;
+        &lt;%= render :partial =&gt; @user.open_job_postings %&gt;
+      &lt;% end %&gt;
 
 
-    &lt;/div&gt;
+    &lt;/div&gt;
 
-    &lt;div id=&quot;show-stat&quot;&gt;
+    &lt;div id=&quot;show-stat&quot;&gt;
        &lt;%= stats_for @user, {:icons_side =&gt; &quot;left&quot;, :breakout =&gt; true} %&gt;
 
     &lt;/div&gt;            
-
-  &lt;/div&gt;
 
-
+  &lt;/div&gt;
+
+
 &lt;% end %&gt;
 
 </diff>
      <filename>app/views/users/show.html.erb</filename>
    </modified>
    <modified>
      <filename>config/boot.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,84 +1,84 @@
-# Be sure to restart your server when you modify this file
-
-
-# Uncomment below to force Rails into production mode when
-# you don't control web/app server and can't set it the proper way
-# ENV['RAILS_ENV'] ||= 'production'
-
-# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
-
-# Bootstrap the Rails environment, frameworks, and default configuration
+# Be sure to restart your server when you modify this file
+
+
+# Uncomment below to force Rails into production mode when
+# you don't control web/app server and can't set it the proper way
+# ENV['RAILS_ENV'] ||= 'production'
+
+# Specifies gem version of Rails to use when vendor/rails is not present
+RAILS_GEM_VERSION = '2.3.4' unless defined? RAILS_GEM_VERSION
+
+# Bootstrap the Rails environment, frameworks, and default configuration
 require File.join(File.dirname(__FILE__), 'boot')
 
 require File.join(File.dirname(__FILE__), 'secret')
-
-
-Rails::Initializer.run do |config|
-  # Settings in config/environments/* take precedence over those specified here.
-  # Application configuration should go into files in config/initializers
-  # -- all .rb files in that directory are automatically loaded.
-  # See Rails::Configuration for more options.
-
-  # Skip frameworks you're not going to use. To use Rails without a database
-  # you must remove the Active Record framework.
-  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
-
-  # Specify gems that this application depends on.
-  # They can then be installed with &quot;rake gems:install&quot; on new installations.
-  # You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
+
+
+Rails::Initializer.run do |config|
+  # Settings in config/environments/* take precedence over those specified here.
+  # Application configuration should go into files in config/initializers
+  # -- all .rb files in that directory are automatically loaded.
+  # See Rails::Configuration for more options.
+
+  # Skip frameworks you're not going to use. To use Rails without a database
+  # you must remove the Active Record framework.
+  # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
+
+  # Specify gems that this application depends on.
+  # They can then be installed with &quot;rake gems:install&quot; on new installations.
+  # You have to specify the :lib option for libraries, where the Gem name (sqlite3-ruby) differs from the file itself (sqlite3)
   # config.gem &quot;bj&quot;
-  # config.gem &quot;sqlite3-ruby&quot;, :lib =&gt; &quot;sqlite3&quot;
+  # config.gem &quot;sqlite3-ruby&quot;, :lib =&gt; &quot;sqlite3&quot;
   # config.gem &quot;aws-s3&quot;, :lib =&gt; &quot;aws/s3&quot;
-  # config.gem &quot;hpricot&quot;, :version =&gt; '0.6', :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
+  # config.gem &quot;hpricot&quot;, :version =&gt; '0.6', :source =&gt; &quot;http://code.whytheluckystiff.net&quot;
   config.gem 'javan-whenever', :lib =&gt; false, :source =&gt; 'http://gems.github.com'
-
-
-  # Only load the plugins named here, in the order given. By default, all plugins
-  # in vendor/plugins are loaded in alphabetical order.
-  # :all can be used as a placeholder for all plugins not explicitly named
-  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
-
-  # Add additional load paths for your own custom dirs
-  # config.load_paths += %W( #{RAILS_ROOT}/extras )
-
-  # Force all environments to use the same logger level
-  # (by default production uses :info, the others :debug)
-  # config.log_level = :debug
-
-  # Make Time.zone default to the specified zone, and make Active Record store time values
-  # in the database in UTC, and return them converted to the specified local zone.
-  # Run &quot;rake -D time&quot; for a list of tasks for finding time zone names. Comment line to use default local time.
-  config.time_zone = 'UTC'
-
-  # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
-  # All files from config/locales/*.rb,yml are added automatically.
-  # config.i18n.load_path &lt;&lt; Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
-  # config.i18n.default_locale = :de
-
-  # Your secret key for verifying cookie session data integrity.
-  # If you change this key, all old sessions will become invalid!
-  # Make sure the secret is at least 30 characters and all random,
-  # no regular words or you'll be exposed to dictionary attacks.
-  config.action_controller.session = {
-    :session_key =&gt; Session_key,
-    :secret      =&gt; Session_secret
-  }
-
-  # Use the database for sessions instead of the cookie-based default,
-  # which shouldn't be used to store highly confidential information
-  # (create the session table with &quot;rake db:sessions:create&quot;)
-  # config.action_controller.session_store = :active_record_store
-
-  # Use SQL instead of Active Record's schema dumper when creating the test database.
-  # This is necessary if your schema can't be completely dumped by the schema dumper,
-  # like if you have constraints or database-specific column types
-  # config.active_record.schema_format = :sql
-
-  # Activate observers that should always be running
-  # Please note that observers generated using script/generate observer need to have an _observer suffix
-  # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
-
-  config.active_record.observers = :user_observer, :invitation_observer
+
+
+  # Only load the plugins named here, in the order given. By default, all plugins
+  # in vendor/plugins are loaded in alphabetical order.
+  # :all can be used as a placeholder for all plugins not explicitly named
+  # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
+
+  # Add additional load paths for your own custom dirs
+  # config.load_paths += %W( #{RAILS_ROOT}/extras )
+
+  # Force all environments to use the same logger level
+  # (by default production uses :info, the others :debug)
+  # config.log_level = :debug
+
+  # Make Time.zone default to the specified zone, and make Active Record store time values
+  # in the database in UTC, and return them converted to the specified local zone.
+  # Run &quot;rake -D time&quot; for a list of tasks for finding time zone names. Comment line to use default local time.
+  config.time_zone = 'UTC'
+
+  # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
+  # All files from config/locales/*.rb,yml are added automatically.
+  # config.i18n.load_path &lt;&lt; Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
+  # config.i18n.default_locale = :de
+
+  # Your secret key for verifying cookie session data integrity.
+  # If you change this key, all old sessions will become invalid!
+  # Make sure the secret is at least 30 characters and all random,
+  # no regular words or you'll be exposed to dictionary attacks.
+  config.action_controller.session = {
+    :session_key =&gt; Session_key,
+    :secret      =&gt; Session_secret
+  }
+
+  # Use the database for sessions instead of the cookie-based default,
+  # which shouldn't be used to store highly confidential information
+  # (create the session table with &quot;rake db:sessions:create&quot;)
+  # config.action_controller.session_store = :active_record_store
+
+  # Use SQL instead of Active Record's schema dumper when creating the test database.
+  # This is necessary if your schema can't be completely dumped by the schema dumper,
+  # like if you have constraints or database-specific column types
+  # config.active_record.schema_format = :sql
+
+  # Activate observers that should always be running
+  # Please note that observers generated using script/generate observer need to have an _observer suffix
+  # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+
+  config.active_record.observers = :user_observer, :invitation_observer
 
 end</diff>
      <filename>config/environment.rb</filename>
    </modified>
    <modified>
      <filename>config/environments/development.rb</filename>
    </modified>
    <modified>
      <filename>config/environments/production.rb</filename>
    </modified>
    <modified>
      <filename>config/environments/test.rb</filename>
    </modified>
    <modified>
      <filename>config/initializers/inflections.rb</filename>
    </modified>
    <modified>
      <filename>config/initializers/mime_types.rb</filename>
    </modified>
    <modified>
      <filename>config/initializers/new_rails_defaults.rb</filename>
    </modified>
    <modified>
      <filename>config/locales/en.yml</filename>
    </modified>
    <modified>
      <diff>@@ -4,32 +4,32 @@ ActionController::Routing::Routes.draw do |map|
   
   map.root :controller =&gt; 'user', :action =&gt; 'index' # should change this
   map.resources :episodes # should remove this
-
+
   
-  map.resource :session
-  map.logout '/logout/', :controller =&gt; 'sessions', :action =&gt; 'destroy'
-  map.login '/login/', :controller =&gt; 'sessions', :action =&gt; 'new'
-  map.register '/register/', :controller =&gt; 'users', :action =&gt; 'create'
-  map.signup '/signup/', :controller =&gt; 'users', :action =&gt; 'new'
-  map.resend_password '/resend_password/', :controller =&gt; 'sessions', :action =&gt; 'resend_password'
-  map.activate '/activate/:activation_code', :controller =&gt; 'users', :action =&gt; 'activate', :activation_code =&gt; nil
-  map.forgot_password '/forgot_password/', :controller =&gt; 'users', :action =&gt; 'forgot_password'
-  map.reset_password '/reset_password/:code', :controller =&gt; 'users', :action =&gt; 'reset_password'
-  map.change_password '/account/change_password', :controller =&gt; 'users', :action =&gt; 'change_password'
-  map.resend_activation_link '/resend_activation_link/', :controller =&gt; 'users', :action =&gt; 'resend_activation_link'
-
-  map.help '/help/', :controller =&gt; 'static', :action =&gt; 'help'
-
-
-
+  map.resource :session
+  map.logout '/logout/', :controller =&gt; 'sessions', :action =&gt; 'destroy'
+  map.login '/login/', :controller =&gt; 'sessions', :action =&gt; 'new'
+  map.register '/register/', :controller =&gt; 'users', :action =&gt; 'create'
+  map.signup '/signup/', :controller =&gt; 'users', :action =&gt; 'new'
+  map.resend_password '/resend_password/', :controller =&gt; 'sessions', :action =&gt; 'resend_password'
+  map.activate '/activate/:activation_code', :controller =&gt; 'users', :action =&gt; 'activate', :activation_code =&gt; nil
+  map.forgot_password '/forgot_password/', :controller =&gt; 'users', :action =&gt; 'forgot_password'
+  map.reset_password '/reset_password/:code', :controller =&gt; 'users', :action =&gt; 'reset_password'
+  map.change_password '/account/change_password', :controller =&gt; 'users', :action =&gt; 'change_password'
+  map.resend_activation_link '/resend_activation_link/', :controller =&gt; 'users', :action =&gt; 'resend_activation_link'
+
+  map.help '/help/', :controller =&gt; 'static', :action =&gt; 'help'
+
+
+
   # try adding as nested resource to user 
   map.my_ideas '/my/ideas/', :controller =&gt; 'ideas', :action =&gt; 'my_ideas'
-  map.post_idea_comment '/post/idea/comment/', :controller =&gt; 'ideas', :action =&gt; 'add_comment'
-
-  map.my_projects '/my/projects/', :controller =&gt; 'projects', :action =&gt; 'my_projects'
-  map.post_project_comment '/post/project/comment/', :controller =&gt; 'projects', :action =&gt; 'add_comment'
+  map.post_idea_comment '/post/idea/comment/', :controller =&gt; 'ideas', :action =&gt; 'add_comment'
+
+  map.my_projects '/my/projects/', :controller =&gt; 'projects', :action =&gt; 'my_projects'
+  map.post_project_comment '/post/project/comment/', :controller =&gt; 'projects', :action =&gt; 'add_comment'
  
-  map.my_jobs '/my/jobs/', :controller =&gt; 'jobs', :action =&gt; 'my_jobs'
+  map.my_jobs '/my/jobs/', :controller =&gt; 'jobs', :action =&gt; 'my_jobs'
   map.open_job_postings '/jobs/open_job_postings/', :controller =&gt; 'jobs', :action =&gt; 'open_job_postings'
   map.job_posting_history '/jobs/job_posting_history/', :controller =&gt; 'jobs', :action =&gt; 'job_posting_history'
   map.open_applied_for_jobs '/jobs/open_applied_for_jobs/', :controller =&gt; 'jobs', :action =&gt; 'open_applied_for_jobs'
@@ -38,24 +38,24 @@ ActionController::Routing::Routes.draw do |map|
   map.active_current_positions '/jobs/active_current_positions/', :controller =&gt; 'jobs', :action =&gt; 'active_current_positions'
 
  
-  # need to RESTify these
-  map.remove_location '/remove_location/', :controller =&gt; 'users', :action =&gt; 'remove_location'
+  # need to RESTify these
+  map.remove_location '/remove_location/', :controller =&gt; 'users', :action =&gt; 'remove_location'
 
-  map.rate '/rate/', :controller =&gt; 'rating', :action =&gt; 'rate'
+  map.rate '/rate/', :controller =&gt; 'rating', :action =&gt; 'rate'
 
-  map.resend_invitation '/resend_invitation', :controller =&gt; 'invitations', :action =&gt; 'resend'
+  map.resend_invitation '/resend_invitation', :controller =&gt; 'invitations', :action =&gt; 'resend'
 
   map.add_to_watchlist '/watchlists/add', :controller =&gt; 'watchlists', :action =&gt; 'add'
 
   map.watchlist_ideas '/watchlists/ideas', :controller =&gt; 'watchlists', :action =&gt; 'ideas'
   map.watchlist_projects '/watchlists/projects', :controller =&gt; 'watchlists', :action =&gt; 'projects'
   map.watchlist_jobs '/watchlists/jobs', :controller =&gt; 'watchlists', :action =&gt; 'jobs'
-  map.watchlist_people '/watchlists/people', :controller =&gt; 'watchlists', :action =&gt; 'people'
-
+  map.watchlist_people '/watchlists/people', :controller =&gt; 'watchlists', :action =&gt; 'people'
+
   map.add_to_interests '/interests/add', :controller =&gt; 'interests', :action =&gt; 'add'
   map.interest_ideas '/interests/ideas', :controller =&gt; 'interests', :action =&gt; 'ideas'
   map.interest_projects '/interests/projects', :controller =&gt; 'interests', :action =&gt; 'projects'
-
+
   map.resources :users, :as =&gt; :people
 
   map.resources :jobs,
@@ -70,47 +70,47 @@ ActionController::Routing::Routes.draw do |map|
   map.resources :projects, :has_many =&gt; [:jobs, :comments]
   
   map.resources :searches
-
-  # The priority is based upon order of creation: first created -&gt; highest priority.
-
-  # Sample of regular route:
-  #   map.connect 'products/:id', :controller =&gt; 'catalog', :action =&gt; 'view'
-  # Keep in mind you can assign values other than :controller and :action
-
-  # Sample of named route:
-  #   map.purchase 'products/:id/purchase', :controller =&gt; 'catalog', :action =&gt; 'purchase'
-  # This route can be invoked with purchase_url(:id =&gt; product.id)
-
-  # Sample resource route (maps HTTP verbs to controller actions automatically):
-  #   map.resources :products
-
-  # Sample resource route with options:
-  #   map.resources :products, :member =&gt; { :short =&gt; :get, :toggle =&gt; :post }, :collection =&gt; { :sold =&gt; :get }
-
-  # Sample resource route with sub-resources:
-  #   map.resources :products, :has_many =&gt; [ :comments, :sales ], :has_one =&gt; :seller
-
-  # Sample resource route with more complex sub-resources
-  #   map.resources :products do |products|
-  #     products.resources :comments
-  #     products.resources :sales, :collection =&gt; { :recent =&gt; :get }
-  #   end
-
-  # Sample resource route within a namespace:
-  #   map.namespace :admin do |admin|
-  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
-  #     admin.resources :products
-  #   end
-
-  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
-  # map.root :controller =&gt; &quot;welcome&quot;
-
-  # See how all your routes lay out with &quot;rake routes&quot;
-
-  # Install the default routes as the lowest priority.
-  # Note: These default routes make all actions in every controller accessible via GET requests. You should
-  # consider removing the them or commenting them out if you're using named routes and resources.
-
-  #    map.connect ':controller/:action/:id'
-  #    map.connect ':controller/:action/:id.:format'
-end
+
+  # The priority is based upon order of creation: first created -&gt; highest priority.
+
+  # Sample of regular route:
+  #   map.connect 'products/:id', :controller =&gt; 'catalog', :action =&gt; 'view'
+  # Keep in mind you can assign values other than :controller and :action
+
+  # Sample of named route:
+  #   map.purchase 'products/:id/purchase', :controller =&gt; 'catalog', :action =&gt; 'purchase'
+  # This route can be invoked with purchase_url(:id =&gt; product.id)
+
+  # Sample resource route (maps HTTP verbs to controller actions automatically):
+  #   map.resources :products
+
+  # Sample resource route with options:
+  #   map.resources :products, :member =&gt; { :short =&gt; :get, :toggle =&gt; :post }, :collection =&gt; { :sold =&gt; :get }
+
+  # Sample resource route with sub-resources:
+  #   map.resources :products, :has_many =&gt; [ :comments, :sales ], :has_one =&gt; :seller
+
+  # Sample resource route with more complex sub-resources
+  #   map.resources :products do |products|
+  #     products.resources :comments
+  #     products.resources :sales, :collection =&gt; { :recent =&gt; :get }
+  #   end
+
+  # Sample resource route within a namespace:
+  #   map.namespace :admin do |admin|
+  #     # Directs /admin/products/* to Admin::ProductsController (app/controllers/admin/products_controller.rb)
+  #     admin.resources :products
+  #   end
+
+  # You can have the root of your site routed with map.root -- just remember to delete public/index.html.
+  # map.root :controller =&gt; &quot;welcome&quot;
+
+  # See how all your routes lay out with &quot;rake routes&quot;
+
+  # Install the default routes as the lowest priority.
+  # Note: These default routes make all actions in every controller accessible via GET requests. You should
+  # consider removing the them or commenting them out if you're using named routes and resources.
+
+  #    map.connect ':controller/:action/:id'
+  #    map.connect ':controller/:action/:id.:format'
+end</diff>
      <filename>config/routes.rb</filename>
    </modified>
    <modified>
      <diff>@@ -2,8 +2,8 @@
 # recaptcha
 Recaptcha_public  = &quot;PUBLUC KEY&quot;
 Recaptcha_private = &quot;PRIVATE KEY&quot;
-ENV['RECAPTCHA_PUBLIC_KEY'] = Recaptcha_public
-ENV['RECAPTCHA_PRIVATE_KEY'] = Recaptcha_private
+ENV['RECAPTCHA_PUBLIC_KEY'] = Recaptcha_public
+ENV['RECAPTCHA_PRIVATE_KEY'] = Recaptcha_private
 
 # google maps
 GoogleAPIKey = &quot;GOOGLE API KEY&quot;</diff>
      <filename>config/secret.sample</filename>
    </modified>
    <modified>
      <diff>@@ -1,24 +1,24 @@
-class CreateUsers &lt; ActiveRecord::Migration
-  def self.up
-    create_table &quot;users&quot;, :force =&gt; true do |t|
-      t.column :login,                     :string, :limit =&gt; 40
-      t.column :name,                      :string, :limit =&gt; 100, :default =&gt; '', :null =&gt; true
-      t.column :email,                     :string, :limit =&gt; 100
-      t.column :crypted_password,          :string, :limit =&gt; 40
-      t.column :salt,                      :string, :limit =&gt; 40
-      t.column :created_at,                :datetime
-      t.column :updated_at,                :datetime
-      t.column :remember_token,            :string, :limit =&gt; 40
-      t.column :remember_token_expires_at, :datetime
-
-      t.column :activation_code,           :string, :limit =&gt; 40
-      t.column :activated_at,              :datetime
-
-    end
-    add_index :users, :login, :unique =&gt; true
-  end
-
-  def self.down
-    drop_table &quot;users&quot;
-  end
-end
+class CreateUsers &lt; ActiveRecord::Migration
+  def self.up
+    create_table &quot;users&quot;, :force =&gt; true do |t|
+      t.column :login,                     :string, :limit =&gt; 40
+      t.column :name,                      :string, :limit =&gt; 100, :default =&gt; '', :null =&gt; true
+      t.column :email,                     :string, :limit =&gt; 100
+      t.column :crypted_password,          :string, :limit =&gt; 40
+      t.column :salt,                      :string, :limit =&gt; 40
+      t.column :created_at,                :datetime
+      t.column :updated_at,                :datetime
+      t.column :remember_token,            :string, :limit =&gt; 40
+      t.column :remember_token_expires_at, :datetime
+
+      t.column :activation_code,           :string, :limit =&gt; 40
+      t.column :activated_at,              :datetime
+
+    end
+    add_index :users, :login, :unique =&gt; true
+  end
+
+  def self.down
+    drop_table &quot;users&quot;
+  end
+end</diff>
      <filename>db/migrate/20090129032201_create_users.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090202143114_add_email_as_index_for_users.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090204233719_create_invitations.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090204234330_add_invited_by_to_user.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090205041715_add_message_to_invite.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090329204338_create_ideas.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090331005744_add_reset_password_to_users.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090401014425_add_pass_word_reset_code_to_users.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090402033817_remove_resend_password_from_users.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090403015316_add_commentable.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090403235146_create_projects.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090405022207_create_jobs.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090409020349_create_job_applications.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090418030633_create_ratings.rb</filename>
    </modified>
    <modified>
      <filename>db/migrate/20090418125721_create_scorecards.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,14 @@
 class IndexTables &lt; ActiveRecord::Migration
   def self.up
-    add_index :ideas, :user_id
+    add_index :ideas, :user_id
     add_index :ideas, :active
-    add_index :ideas, :created_at
-    add_index :ideas, :updated_at
+    add_index :ideas, :created_at
+    add_index :ideas, :updated_at
 
-    add_index :interests, :user_id
-    add_index :interests, :interest_type
-    add_index :interests, :interest_id
-    add_index :interests, :created_at
+    add_index :interests, :user_id
+    add_index :interests, :interest_type
+    add_index :interests, :interest_id
+    add_index :interests, :created_at
 
     add_index :invitations, :user_id
     add_index :invitations, :email, :unique =&gt; true
@@ -21,64 +21,64 @@ class IndexTables &lt; ActiveRecord::Migration
     add_index :jobs, :project_id
     add_index :jobs, :active
     add_index :jobs, :open
-    add_index :jobs, :created_at
+    add_index :jobs, :created_at
 
     add_index :locations, :located_type
     add_index :locations, :located_id
     add_index :locations, :latitude
     add_index :locations, :longitude
-    
+    
     add_index :logons, :user_id, :unique =&gt; true
 
-    add_index :messages, :from_id
-    add_index :messages, :to_id
-    add_index :messages, :created_at
+    add_index :messages, :from_id
+    add_index :messages, :to_id
+    add_index :messages, :created_at
 
     add_index :polymorphic_general_skills, :object_type
-    add_index :polymorphic_general_skills, :object_id
-    add_index :polymorphic_general_skills, :general_skill_id
+    add_index :polymorphic_general_skills, :object_id
+    add_index :polymorphic_general_skills, :general_skill_id
 
-    add_index :projects, :active
-    add_index :projects, :user_id
-    add_index :projects, :idea_id
-    add_index :projects, :created_at
-    add_index :projects, :updated_at
+    add_index :projects, :active
+    add_index :projects, :user_id
+    add_index :projects, :idea_id
+    add_index :projects, :created_at
+    add_index :projects, :updated_at
 
-    add_index :ratings, :scorecard_id
-    add_index :ratings, :user_id
+    add_index :ratings, :scorecard_id
+    add_index :ratings, :user_id
 
-    add_index :relevant_industries, :industrial_type
-    add_index :relevant_industries, :industrial_id
-    add_index :relevant_industries, :industry_id
+    add_index :relevant_industries, :industrial_type
+    add_index :relevant_industries, :industrial_id
+    add_index :relevant_industries, :industry_id
 
-    add_index :scorecards, :scorable_type
-    add_index :scorecards, :scorable_id
+    add_index :scorecards, :scorable_type
+    add_index :scorecards, :scorable_id
 
-    add_index :user_locations, :user_id
-    add_index :user_locations, :location_id
+    add_index :user_locations, :user_id
+    add_index :user_locations, :location_id
 
-    add_index :users, :active
-    add_index :users, :no_cash_ok
-    add_index :users, :currently_available
-    add_index :users, :updated_at
-    add_index :users, :created_at
+    add_index :users, :active
+    add_index :users, :no_cash_ok
+    add_index :users, :currently_available
+    add_index :users, :updated_at
+    add_index :users, :created_at
 
-    add_index :watchlists, :user_id
-    add_index :watchlists, :watch_type
-    add_index :watchlists, :watch_id
+    add_index :watchlists, :user_id
+    add_index :watchlists, :watch_type
+    add_index :watchlists, :watch_id
     add_index :watchlists, :created_at
   end
 
   def self.down
-    remove_index :ideas, :user_id
+    remove_index :ideas, :user_id
     remove_index :ideas, :active
-    remove_index :ideas, :created_at
-    remove_index :ideas, :updated_at
+    remove_index :ideas, :created_at
+    remove_index :ideas, :updated_at
 
-    remove_index :interests, :user_id
-    remove_index :interests, :interest_type
-    remove_index :interests, :interest_id
-    remove_index :interests, :created_at
+    remove_index :interests, :user_id
+    remove_index :interests, :interest_type
+    remove_index :interests, :interest_id
+    remove_index :interests, :created_at
 
     remove_index :invitations, :user_id
     remove_index :invitations, :email, :unique =&gt; true
@@ -91,50 +91,50 @@ class IndexTables &lt; ActiveRecord::Migration
     remove_index :jobs, :project_id
     remove_index :jobs, :active
     remove_index :jobs, :open
-    remove_index :jobs, :created_at
-    remove_index :jobs, :updated_at
+    remove_index :jobs, :created_at
+    remove_index :jobs, :updated_at
 
     remove_index :locations, :located_type
     remove_index :locations, :located_id
     remove_index :locations, :latitude
     remove_index :locations, :longitude
-    
+    
     remove_index :logons, :user_id, :unique =&gt; true
 
-    remove_index :messages, :from_id
-    remove_index :messages, :to_id
-    remove_index :messages, :created_at
+    remove_index :messages, :from_id
+    remove_index :messages, :to_id
+    remove_index :messages, :created_at
 
     remove_index :polymorphic_general_skills, :object_type
-    remove_index :polymorphic_general_skills, :object_id
-    remove_index :polymorphic_general_skills, :general_skill_id
+    remove_index :polymorphic_general_skills, :object_id
+    remove_index :polymorphic_general_skills, :general_skill_id
 
-    remove_index :projects, :active
-    remove_index :projects, :user_id
-    remove_index :projects, :idea_id
-    remove_index :projects, :created_at
-    remove_index :projects, :updated_at
+    remove_index :projects, :active
+    remove_index :projects, :user_id
+    remove_index :projects, :idea_id
+    remove_index :projects, :created_at
+    remove_index :projects, :updated_at
 
-    remove_index :ratings, :scorecard_id
-    remove_index :ratings, :user_id
+    remove_index :ratings, :scorecard_id
+    remove_index :ratings, :user_id
 
-    remove_index :relevant_industries, :industrial_type
-    remove_index :relevant_industries, :industrial_id
-    remove_index :relevant_industries, :industry_id
+    remove_index :relevant_industries, :industrial_type
+    remove_index :relevant_industries, :industrial_id
+    remove_index :relevant_industries, :industry_id
 
-    remove_index :scorecards, :scorable_type
-    remove_index :scorecards, :scorable_id
+    remove_index :scorecards, :scorable_type
+    remove_index :scorecards, :scorable_id
 
-    remove_index :user_locations, :user_id
-    remove_index :user_locations, :location_id
+    remove_index :user_locations, :user_id
+    remove_index :user_locations, :location_id
 
-    remove_index :users, :active
-    remove_index :users, :no_cash_ok
-    remove_index :users, :currently_available
+    remove_index :users, :active
+    remove_index :users, :no_cash_ok
+    remove_index :users, :currently_available
 
-    remove_index :watchlists, :user_id
-    remove_index :watchlists, :watch_type
-    remove_index :watchlists, :watch_id
+    remove_index :watchlists, :user_id
+    remove_index :watchlists, :watch_type
+    remove_index :watchlists, :watch_id
     remove_index :watchlists, :created_at
     
   end</diff>
      <filename>db/migrate/20090725140036_index_tables.rb</filename>
    </modified>
    <modified>
      <filename>db/schema.rb</filename>
    </modified>
    <modified>
      <filename>doc/README_FOR_APP</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @comments
 
-Feature: Posting comments
+Feature: Posting comments
   In order to give people feedback
   As a logged in user
   I want to post comments</diff>
      <filename>features/comments.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @dashboard
 
- Feature: Dashboard
+ Feature: Dashboard
   In order to know what's going on
   As a user
   I want to see stats about my stuff and things i am watching</diff>
      <filename>features/dashboard.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,7 @@
 # /features/icebreakers.feature
 @icebreakers
 
-  Feature: Icebreakers
+  Feature: Icebreakers
     In order to stimulate some ideas during registration
     As a user
     I want to see some icebreakers during registration</diff>
      <filename>features/icebreakers.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @ideas
 
- Feature: Basic idea management
+ Feature: Basic idea management
   In order to share and look for ideas
   As a user
   I want to be able to post, update, view, and comment on ideas</diff>
      <filename>features/ideas.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @interests
 
-Feature: Interest (showing interest in things)
+Feature: Interest (showing interest in things)
   To let people know I am interested in some idea or project,
   I should be able to add them to my interested list, and at the same time
   Let others know that I am interested in this.</diff>
      <filename>features/interests.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @invitations
 
-Feature: Sending invitations to join commune2
+Feature: Sending invitations to join commune2
   Members of the community, should be be able to invite others to join.
   However, to maintain exclusivity and site performance, number of invitations should be limited.
   Only admin users should have the ability to invite unlimitted members.</diff>
      <filename>features/invitations.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @job_applications
 
- Feature: Basic job application and hiring process
+ Feature: Basic job application and hiring process
   In order to join a project or find help for my project
   As a user
   I want to be able to apply for jobs, review job applications, make an offer, and accept a job</diff>
      <filename>features/job_applications.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @jobs
 
-Feature: Basic job management
+Feature: Basic job management
   In order to find help for my projects, or help others
   As a user
   I want to be able to post, update, view, apply for jobs</diff>
      <filename>features/jobs.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @login_required
 
- Feature: Required logon for certain functionality
+ Feature: Required logon for certain functionality
   In order for the site to maintain quality content
   As a user
   I want to be logged in before I can perform basic tasks</diff>
      <filename>features/login_required.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @projects
 
-Feature: Basic project management (note: these are not project management tools)
+Feature: Basic project management (note: these are not project management tools)
   In order to start a project and look for projects
   As a user
   I want to be able to post, update, view, and comment on projects</diff>
      <filename>features/projects.feature</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@
 # Need to figure out how to actually test clicking on rating - may require Selenium #
 #####################################################################################
 
-Feature: Basic rating functionality
+Feature: Basic rating functionality
   In order to provide feedback to the community
   As a logged in user
   I want to be able to rate users, ideas, and projects</diff>
      <filename>features/rating.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @scorecard
 
- Feature: Basic scorecard functionality
+ Feature: Basic scorecard functionality
   To get a better sense of what a person is looking at
   a scorecard will provide basic statistics, tracking the following information:
     - rating score</diff>
      <filename>features/scorecard.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 require File.expand_path(File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;support&quot;, &quot;paths&quot;))
-require 'hpricot'
+require 'hpricot'
 
 # Commonly used webrat steps
 # http://github.com/brynary/webrat</diff>
      <filename>features/step_definitions/webrat_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 @users
- Feature: Basic user management
+ Feature: Basic user management
   As a user
   I want to be able to register, log in, log out, recover password, and invite
   So that I can use the website and invite others</diff>
      <filename>features/users.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 @watchlists
 
-Feature: Watchlist
+Feature: Watchlist
   In order to track things on the website
   As a logged in user
   I want to add things to my watchlist</diff>
      <filename>features/watchlists.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,189 +1,189 @@
-module AuthenticatedSystem
-  protected
-    # Returns true or false if the user is logged in.
-    # Preloads @current_user with the user model if they're logged in.
-    def logged_in?
-      !!current_user
-    end
-
-    # Accesses the current user from the session.
-    # Future calls avoid the database because nil is not equal to false.
-    def current_user
-      @current_user ||= (login_from_session || login_from_basic_auth || login_from_cookie) unless @current_user == false
-    end
-
-    # Store the given user id in the session.
-    def current_user=(new_user)
-      session[:user_id] = new_user ? new_user.id : nil
-      @current_user = new_user || false
-    end
-
-    # Check if the user is authorized
-    #
-    # Override this method in your controllers if you want to restrict access
-    # to only a few actions or if you want to check if the user
-    # has the correct rights.
-    #
-    # Example:
-    #
-    #  # only allow nonbobs
-    #  def authorized?
-    #    current_user.login != &quot;bob&quot;
-    #  end
-    #
-    def authorized?(action = action_name, resource = nil)
-      logged_in?
-    end
-
-    # Filter method to enforce a login requirement.
-    #
-    # To require logins for all actions, use this in your controllers:
-    #
-    #   before_filter :login_required
-    #
-    # To require logins for specific actions, use this in your controllers:
-    #
-    #   before_filter :login_required, :only =&gt; [ :edit, :update ]
-    #
-    # To skip this in a subclassed controller:
-    #
-    #   skip_before_filter :login_required
-    #
-    def login_required
-      authorized? || access_denied
-    end
-
-    # Redirect as appropriate when an access request fails.
-    #
-    # The default action is to redirect to the login screen.
-    #
-    # Override this method in your controllers if you want to have special
-    # behavior in case the user is not authorized
-    # to access the requested action.  For example, a popup window might
-    # simply close itself.
-    def access_denied
-      respond_to do |format|
-        format.html do
-          store_location
-          redirect_to new_session_path
-        end
-        # format.any doesn't work in rails version &lt; http://dev.rubyonrails.org/changeset/8987
-        # Add any other API formats here.  (Some browsers, notably IE6, send Accept: */* and trigger 
-        # the 'format.any' block incorrectly. See http://bit.ly/ie6_borken or http://bit.ly/ie6_borken2
-        # for a workaround.)
-        format.any(:json, :xml) do
-          request_http_basic_authentication 'Web Password'
-        end
-      end
-    end
-
-    # Store the URI of the current request in the session.
-    #
-    # We can return to this location by calling #redirect_back_or_default.
-    def store_location
-      session[:return_to] = request.request_uri
-    end
-
-    # Redirect to the URI stored by the most recent store_location call or
-    # to the passed default.  Set an appropriately modified
-    #   after_filter :store_location, :only =&gt; [:index, :new, :show, :edit]
-    # for any controller you want to be bounce-backable.
-    def redirect_back_or_default(default)
-      redirect_to(session[:return_to] || default)
-      session[:return_to] = nil
-    end
-
-    # Inclusion hook to make #current_user and #logged_in?
-    # available as ActionView helper methods.
-    def self.included(base)
-      base.send :helper_method, :current_user, :logged_in?, :authorized? if base.respond_to? :helper_method
-    end
-
-    #
-    # Login
-    #
-
-    # Called from #current_user.  First attempt to login by the user id stored in the session.
-    def login_from_session
-      self.current_user = User.find_by_id(session[:user_id]) if session[:user_id]
-    end
-
-    # Called from #current_user.  Now, attempt to login by basic authentication information.
-    def login_from_basic_auth
-      authenticate_with_http_basic do |login, password|
-        self.current_user = User.authenticate(login, password)
-      end
-    end
-    
-    #
-    # Logout
-    #
-
-    # Called from #current_user.  Finaly, attempt to login by an expiring token in the cookie.
-    # for the paranoid: we _should_ be storing user_token = hash(cookie_token, request IP)
-    def login_from_cookie
-      user = cookies[:auth_token] &amp;&amp; User.find_by_remember_token(cookies[:auth_token])
-      if user &amp;&amp; user.remember_token?
-        self.current_user = user
-        handle_remember_cookie! false # freshen cookie token (keeping date)
-        self.current_user
-      end
-    end
-
-    # This is ususally what you want; resetting the session willy-nilly wreaks
-    # havoc with forgery protection, and is only strictly necessary on login.
-    # However, **all session state variables should be unset here**.
-    def logout_keeping_session!
-      # Kill server-side auth cookie
-      @current_user.forget_me if @current_user.is_a? User
-      @current_user = false     # not logged in, and don't do it for me
-      kill_remember_cookie!     # Kill client-side auth cookie
-      session[:user_id] = nil   # keeps the session but kill our variable
-      # explicitly kill any other session variables you set
-    end
-
-    # The session should only be reset at the tail end of a form POST --
-    # otherwise the request forgery protection fails. It's only really necessary
-    # when you cross quarantine (logged-out to logged-in).
-    def logout_killing_session!
-      logout_keeping_session!
-      reset_session
-    end
-    
-    #
-    # Remember_me Tokens
-    #
-    # Cookies shouldn't be allowed to persist past their freshness date,
-    # and they should be changed at each login
-
-    # Cookies shouldn't be allowed to persist past their freshness date,
-    # and they should be changed at each login
-
-    def valid_remember_cookie?
-      return nil unless @current_user
-      (@current_user.remember_token?) &amp;&amp; 
-        (cookies[:auth_token] == @current_user.remember_token)
-    end
-    
-    # Refresh the cookie auth token if it exists, create it otherwise
-    def handle_remember_cookie!(new_cookie_flag)
-      return unless @current_user
-      case
-      when valid_remember_cookie? then @current_user.refresh_token # keeping same expiry date
-      when new_cookie_flag        then @current_user.remember_me 
-      else                             @current_user.forget_me
-      end
-      send_remember_cookie!
-    end
-  
-    def kill_remember_cookie!
-      cookies.delete :auth_token
-    end
-    
-    def send_remember_cookie!
-      cookies[:auth_token] = {
-        :value   =&gt; @current_user.remember_token,
-        :expires =&gt; @current_user.remember_token_expires_at }
-    end
-
-end
+module AuthenticatedSystem
+  protected
+    # Returns true or false if the user is logged in.
+    # Preloads @current_user with the user model if they're logged in.
+    def logged_in?
+      !!current_user
+    end
+
+    # Accesses the current user from the session.
+    # Future calls avoid the database because nil is not equal to false.
+    def current_user
+      @current_user ||= (login_from_session || login_from_basic_auth || login_from_cookie) unless @current_user == false
+    end
+
+    # Store the given user id in the session.
+    def current_user=(new_user)
+      session[:user_id] = new_user ? new_user.id : nil
+      @current_user = new_user || false
+    end
+
+    # Check if the user is authorized
+    #
+    # Override this method in your controllers if you want to restrict access
+    # to only a few actions or if you want to check if the user
+    # has the correct rights.
+    #
+    # Example:
+    #
+    #  # only allow nonbobs
+    #  def authorized?
+    #    current_user.login != &quot;bob&quot;
+    #  end
+    #
+    def authorized?(action = action_name, resource = nil)
+      logged_in?
+    end
+
+    # Filter method to enforce a login requirement.
+    #
+    # To require logins for all actions, use this in your controllers:
+    #
+    #   before_filter :login_required
+    #
+    # To require logins for specific actions, use this in your controllers:
+    #
+    #   before_filter :login_required, :only =&gt; [ :edit, :update ]
+    #
+    # To skip this in a subclassed controller:
+    #
+    #   skip_before_filter :login_required
+    #
+    def login_required
+      authorized? || access_denied
+    end
+
+    # Redirect as appropriate when an access request fails.
+    #
+    # The default action is to redirect to the login screen.
+    #
+    # Override this method in your controllers if you want to have special
+    # behavior in case the user is not authorized
+    # to access the requested action.  For example, a popup window might
+    # simply close itself.
+    def access_denied
+      respond_to do |format|
+        format.html do
+          store_location
+          redirect_to new_session_path
+        end
+        # format.any doesn't work in rails version &lt; http://dev.rubyonrails.org/changeset/8987
+        # Add any other API formats here.  (Some browsers, notably IE6, send Accept: */* and trigger 
+        # the 'format.any' block incorrectly. See http://bit.ly/ie6_borken or http://bit.ly/ie6_borken2
+        # for a workaround.)
+        format.any(:json, :xml) do
+          request_http_basic_authentication 'Web Password'
+        end
+      end
+    end
+
+    # Store the URI of the current request in the session.
+    #
+    # We can return to this location by calling #redirect_back_or_default.
+    def store_location
+      session[:return_to] = request.request_uri
+    end
+
+    # Redirect to the URI stored by the most recent store_location call or
+    # to the passed default.  Set an appropriately modified
+    #   after_filter :store_location, :only =&gt; [:index, :new, :show, :edit]
+    # for any controller you want to be bounce-backable.
+    def redirect_back_or_default(default)
+      redirect_to(session[:return_to] || default)
+      session[:return_to] = nil
+    end
+
+    # Inclusion hook to make #current_user and #logged_in?
+    # available as ActionView helper methods.
+    def self.included(base)
+      base.send :helper_method, :current_user, :logged_in?, :authorized? if base.respond_to? :helper_method
+    end
+
+    #
+    # Login
+    #
+
+    # Called from #current_user.  First attempt to login by the user id stored in the session.
+    def login_from_session
+      self.current_user = User.find_by_id(session[:user_id]) if session[:user_id]
+    end
+
+    # Called from #current_user.  Now, attempt to login by basic authentication information.
+    def login_from_basic_auth
+      authenticate_with_http_basic do |login, password|
+        self.current_user = User.authenticate(login, password)
+      end
+    end
+    
+    #
+    # Logout
+    #
+
+    # Called from #current_user.  Finaly, attempt to login by an expiring token in the cookie.
+    # for the paranoid: we _should_ be storing user_token = hash(cookie_token, request IP)
+    def login_from_cookie
+      user = cookies[:auth_token] &amp;&amp; User.find_by_remember_token(cookies[:auth_token])
+      if user &amp;&amp; user.remember_token?
+        self.current_user = user
+        handle_remember_cookie! false # freshen cookie token (keeping date)
+        self.current_user
+      end
+    end
+
+    # This is ususally what you want; resetting the session willy-nilly wreaks
+    # havoc with forgery protection, and is only strictly necessary on login.
+    # However, **all session state variables should be unset here**.
+    def logout_keeping_session!
+      # Kill server-side auth cookie
+      @current_user.forget_me if @current_user.is_a? User
+      @current_user = false     # not logged in, and don't do it for me
+      kill_remember_cookie!     # Kill client-side auth cookie
+      session[:user_id] = nil   # keeps the session but kill our variable
+      # explicitly kill any other session variables you set
+    end
+
+    # The session should only be reset at the tail end of a form POST --
+    # otherwise the request forgery protection fails. It's only really necessary
+    # when you cross quarantine (logged-out to logged-in).
+    def logout_killing_session!
+      logout_keeping_session!
+      reset_session
+    end
+    
+    #
+    # Remember_me Tokens
+    #
+    # Cookies shouldn't be allowed to persist past their freshness date,
+    # and they should be changed at each login
+
+    # Cookies shouldn't be allowed to persist past their freshness date,
+    # and they should be changed at each login
+
+    def valid_remember_cookie?
+      return nil unless @current_user
+      (@current_user.remember_token?) &amp;&amp; 
+        (cookies[:auth_token] == @current_user.remember_token)
+    end
+    
+    # Refresh the cookie auth token if it exists, create it otherwise
+    def handle_remember_cookie!(new_cookie_flag)
+      return unless @current_user
+      case
+      when valid_remember_cookie? then @current_user.refresh_token # keeping same expiry date
+      when new_cookie_flag        then @current_user.remember_me 
+      else                             @current_user.forget_me
+      end
+      send_remember_cookie!
+    end
+  
+    def kill_remember_cookie!
+      cookies.delete :auth_token
+    end
+    
+    def send_remember_cookie!
+      cookies[:auth_token] = {
+        :value   =&gt; @current_user.remember_token,
+        :expires =&gt; @current_user.remember_token_expires_at }
+    end
+
+end</diff>
      <filename>lib/authenticated_system.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,12 @@
-module AuthenticatedTestHelper
-  # Sets the current user in the session from the user fixtures.
-  def login_as(user)
-    @request.session[:user_id] = user ? users(user).id : nil
-  end
-
-  def authorize_as(user)
-    @request.env[&quot;HTTP_AUTHORIZATION&quot;] = user ? ActionController::HttpAuthentication::Basic.encode_credentials(users(user).login, 'monkey') : nil
-  end
-  
-
-end
+module AuthenticatedTestHelper
+  # Sets the current user in the session from the user fixtures.
+  def login_as(user)
+    @request.session[:user_id] = user ? users(user).id : nil
+  end
+
+  def authorize_as(user)
+    @request.env[&quot;HTTP_AUTHORIZATION&quot;] = user ? ActionController::HttpAuthentication::Basic.encode_credentials(users(user).login, 'monkey') : nil
+  end
+  
+
+end</diff>
      <filename>lib/authenticated_test_helper.rb</filename>
    </modified>
    <modified>
      <filename>lib/smtp_tls.rb</filename>
    </modified>
    <modified>
      <filename>public/404.html</filename>
    </modified>
    <modified>
      <filename>public/422.html</filename>
    </modified>
    <modified>
      <filename>public/500.html</filename>
    </modified>
    <modified>
      <filename>public/dispatch.cgi</filename>
    </modified>
    <modified>
      <filename>public/dispatch.fcgi</filename>
    </modified>
    <modified>
      <filename>public/dispatch.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>2c386fbaef7cc617d47ff46e3e390c82f09b4c72</id>
    </parent>
  </parents>
  <author>
    <name>Justin George</name>
    <email>justin.george@gmail.com</email>
  </author>
  <url>http://github.com/jaggederest/commune2/commit/becde274229c008eb63f8f79019451bae32b38ed</url>
  <id>becde274229c008eb63f8f79019451bae32b38ed</id>
  <committed-date>2009-11-07T12:45:26-08:00</committed-date>
  <authored-date>2009-11-07T12:45:26-08:00</authored-date>
  <message>dos2unix saves my ass agin</message>
  <tree>056a1f1158867b21e929479754086b50f54b887b</tree>
  <committer>
    <name>Justin George</name>
    <email>justin.george@gmail.com</email>
  </committer>
</commit>
