<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -10,7 +10,8 @@ class ApplicationController &lt; ActionController::Base
 
   # Pick a unique cookie name to distinguish our session data from others'
   helper_method :format_date, :_, :receipt, :is_ministry_leader, :is_ministry_leader_somewhere, :team_admin, 
-                :get_ministry, :current_user, :is_ministry_admin, :authorized?, :is_group_leader, :can_manage
+                :get_ministry, :current_user, :is_ministry_admin, :authorized?, :is_group_leader, :can_manage, 
+		:get_people_responsible_for
   before_filter CASClient::Frameworks::Rails::GatewayFilter unless Rails.env.test?
   #    use this line for production  
   before_filter :login_required, :get_person, :get_ministry, :set_locale#, :get_bar
@@ -153,6 +154,20 @@ class ApplicationController &lt; ActionController::Base
                                        Person.table_name + '.' + _(:first_name, :person))
     end
     
+    def get_people_responsible_for
+      @people_responsible_for = @person.people_responsible_for
+    end
+
+    def get_people_in_ministry_campus
+      @people_in_ministry_campus = []
+      peeps_in_m = get_ministry.people.find(:all)
+      peeps_in_m.each do |person|
+        if person.campus_involvements.find(:first) == @person.campus_involvements.find(:first) #Needs to be changed when person.primary_campus is working
+	  @people_in_ministry_campus &lt;&lt; person
+	end
+      end
+    end
+    
     # ===========
     # = Filters =
     # ===========
@@ -249,10 +264,6 @@ class ApplicationController &lt; ActionController::Base
       request.format = :facebook if iphone_request?
     end
     
-    def get_people_responsible_for
-      @people_responsible_for = @person.people_responsible_for.find(:all)
-    end
-
 private
   # Ensures that the _person_ is involved in the 'No Ministry' ministry
   # BUG 1857</diff>
      <filename>app/controllers/application_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -230,6 +230,7 @@ class PeopleController &lt; ApplicationController
 
   # GET /people/1;edit
   def edit
+    get_people_in_ministry_campus
     setup_vars
     setup_campuses
     setup_states
@@ -313,8 +314,15 @@ class PeopleController &lt; ApplicationController
   # PUT /people/1
   # PUT /people/1.xml
   def update
+    #throw params.inspect
     setup_states
+    get_people_responsible_for
+    get_ministry_involvement(get_ministry)
     @person = Person.find(params[:id])
+    if params[:responsible_person_id]
+      @ministry_involvement.responsible_person = Person.find(params[:responsible_person_id])
+      @ministry_involvement.save
+    end
     if params[:current_address]
       @person.current_address ||= CurrentAddress.new(:email =&gt; params[:current_address][:email])
       @person.current_address.update_attributes(params[:current_address])</diff>
      <filename>app/controllers/people_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -20,7 +20,9 @@ class Person &lt; ActiveRecord::Base
   has_one :responsible_person, :class_name =&gt; &quot;Person&quot;, :through =&gt; :ministry_involvements
   has_many :involvements_responsible_for, :class_name =&gt; &quot;MinistryInvolvement&quot;, :foreign_key =&gt; &quot;responsible_person_id&quot;
   has_many :people_responsible_for, :class_name =&gt; &quot;Person&quot;, :through =&gt; :involvements_responsible_for, :source =&gt; :person
-
+ 
+  
+  
   # Address Relationships
   has_many :addresses, :class_name =&gt; &quot;Address&quot;, :foreign_key =&gt; _(:person_id, :address)
   has_one :current_address, :class_name =&gt; &quot;CurrentAddress&quot;, :foreign_key =&gt; _(:person_id, :address), :conditions =&gt; _(:address_type, :address) + &quot; = 'current'&quot;</diff>
      <filename>app/models/person.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,7 +19,7 @@
     	&lt;/table&gt;
   	&lt;%- end -%&gt;
   	&lt;/td&gt;
-	&lt;/tr&gt;
+	&lt;/tr&gt;s
   &lt;/table&gt;
   
     
@@ -33,6 +33,11 @@
     	&lt;tr&gt;&lt;th&gt;Email&lt;/th&gt;&lt;td&gt;&lt;%= text_field :current_address, :email %&gt;&lt;/td&gt;&lt;/tr&gt;
     	&lt;tr&gt;&lt;th&gt;Date of Birth&lt;/th&gt;&lt;td class=&quot;date&quot;&gt;&lt;%= f.date_select :birth_date, date_options(1920) %&gt;&lt;/td&gt;&lt;/tr&gt;
     	&lt;tr&gt;&lt;th&gt;Gender&lt;/th&gt;&lt;td&gt;&lt;%= f.select :gender, [['Male', 1],['Female', 0]], {}, :selected =&gt; @person.gender %&gt;&lt;/td&gt;&lt;/tr&gt;
+	
+	&lt;tr&gt;&lt;th&gt;Responsible Person&lt;/th&gt;&lt;td&gt;
+	    &lt;%= select_tag :responsible_person_id, options_from_collection_for_select(@people_in_ministry_campus, 'id', 'full_name') %&gt;
+	&lt;/td&gt;&lt;/tr&gt;
+	  
     	&lt;tr&gt;&lt;th&gt;&amp;nbsp;&lt;/th&gt;&lt;td&gt;&amp;nbsp;&lt;/td&gt;	&lt;/tr&gt;
     	&lt;/table&gt;
   	&lt;/td&gt;</diff>
      <filename>app/views/people/_edit.html.erb</filename>
    </modified>
    <modified>
      <diff>@@ -15,13 +15,17 @@
       	  &lt;td&gt;&lt;%= @person.user.facebook_username.present? ? @person.user.facebook_username : 'Click &quot;Edit Information&quot; to link your Facebook Account' %&gt;&lt;/td&gt;
       	&lt;/tr&gt;
       &lt;%- end -%&gt;
-        &lt;tr&gt;&lt;th&gt;People Responsible For&lt;/th&gt;&lt;td&gt;
-	  &lt;%- if @people_responsible_for -%&gt;
-	    &lt;%- @people_responsible_for.each do |person| -%&gt;
-	      &lt;%= person.full_name %&gt;
-	    &lt;%- end -%&gt;
-	  &lt;%- end -%&gt;
-	&lt;/td&gt;&lt;/tr&gt;
+      
+      &lt;tr&gt;&lt;th&gt;People Responsible For&lt;/th&gt;&lt;td&gt;
+        &lt;%- if @people_responsible_for -%&gt;
+          &lt;%- @people_responsible_for.each do |person| -%&gt;
+            &lt;%= link_to person.full_name, person_url(person.id) %&gt;
+            &lt;br&gt;
+          &lt;%- end -%&gt;
+        &lt;%- end -%&gt;
+      &lt;/td&gt;&lt;/tr&gt;
+      
+      
 	  &lt;/table&gt;
 	&lt;/td&gt;
 	
@@ -33,10 +37,10 @@
     	&lt;tr&gt;&lt;th&gt;Graduation Date&lt;/th&gt;&lt;td&gt;&lt;%= format_date(@person.most_recent_involvement.try(:graduation_date)) %&gt;&lt;/td&gt;&lt;/tr&gt;
     	&lt;tr&gt;&lt;th&gt;Major&lt;/th&gt;&lt;td&gt;&lt;%= @person.most_recent_involvement.try(:major) %&gt;&lt;/td&gt;&lt;/tr&gt;
     	&lt;tr&gt;&lt;th&gt;Minor&lt;/th&gt;&lt;td&gt;&lt;%= @person.most_recent_involvement.try(:minor) %&gt;&lt;/td&gt;&lt;/tr&gt;
-	&lt;tr&gt;&lt;th&gt;Responsible Person&lt;th&gt;&lt;td&gt; 	
-	&lt;%- if @person.responsible_person -%&gt;
-	    &lt;%= link_to '#{@person.responsible_person.full_name}', person_url(@person.responsible_person['person_id']) %&gt;
-	&lt;%- end -%&gt;
+	&lt;tr&gt;&lt;th&gt;Responsible Person&lt;th&gt;&lt;td&gt; 
+    &lt;% if @person.responsible_person %&gt;
+	    &lt;%= link_to @person.responsible_person.full_name, person_url(@person.responsible_person.id) %&gt;
+    &lt;% end %&gt;
 	&lt;/td&gt;&lt;/tr&gt;
 	
     	&lt;%- if !@person.url.blank?</diff>
      <filename>app/views/people/_view.html.erb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>29ae19fe716f819059bc21cbd793cc36ba3f3fbb</id>
    </parent>
  </parents>
  <author>
    <name>Eric Bendall</name>
    <email>ebendall@gmail.com</email>
  </author>
  <url>http://github.com/twinge/ministry-tracker/commit/76238bcedafda400cdde90f2a5d7dd203092e902</url>
  <id>76238bcedafda400cdde90f2a5d7dd203092e902</id>
  <committed-date>2009-06-02T14:38:11-07:00</committed-date>
  <authored-date>2009-06-02T14:38:11-07:00</authored-date>
  <message>Links work, dropdown menu works, everything so far works. Currently what we have is a link on a profile to the responsible Person's profile, a list of links to the profiles of who the user is those responsible for, and a dropdown menu that allows the user to change his RP</message>
  <tree>7d14acf22028487cbfc21a8578c00d3f1f643ff7</tree>
  <committer>
    <name>Eric Bendall</name>
    <email>ebendall@gmail.com</email>
  </committer>
</commit>
