<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>app/views/admin/preferences/edit.html.haml</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,21 @@
 class Admin::PreferencesController &lt; AdminController
+  def create
+    update
+  end
+  
+  def show
+    edit
+    render :action =&gt; &quot;edit&quot;
+  end
+  
   def edit
-    @preferences = Preference.all
+    @preferences = Preference.all.to_key_and_value_pair
   end
   
   def update
-    @preferences = Preference.update_many(params[:preferences])
+    Preference.update_many(params[:preferences])
+    @preferences = Preference.all.to_key_and_value_pair
     flash[:success] = &quot;Preferences have been updated&quot;
-    redirect_to edit_admin_preferences_path
+    render :action =&gt; &quot;edit&quot;
   end
 end</diff>
      <filename>app/controllers/admin/preferences_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,7 @@
 class ApplicationController &lt; ActionController::Base
   include AuthenticatedSystem
   include DateTimeExtensions
+  include ArrayExtensions
   
   helper :all # include all helpers, all the time
  </diff>
      <filename>app/controllers/application.rb</filename>
    </modified>
    <modified>
      <diff>@@ -150,3 +150,6 @@ textarea {
   font-weight: bold;
   text-align: right;
   color: #e5d9d9; }
+
+label {
+  font-weight: bold; }</diff>
      <filename>public/stylesheets/admin.css</filename>
    </modified>
    <modified>
      <diff>@@ -169,3 +169,6 @@ textarea
   font-weight: bold
   text-align: right
   color: #e5d9d9
+
+label
+  font-weight: bold
\ No newline at end of file</diff>
      <filename>public/stylesheets/sass/admin.sass</filename>
    </modified>
    <modified>
      <diff>@@ -21,13 +21,14 @@ describe Admin::PreferencesController do
       end
     end
   
-    describe &quot;edit action&quot; do
+    describe &quot;update action&quot; do
       it &quot;should succesfully complete the action&quot; do
         Preference.should_receive(:update_many).once.and_return(true)
         put :update, :preferences =&gt; { :name =&gt; &quot;simple&quot;, :theme =&gt; &quot;fuschia&quot; }
-        assigns(:preferences).should_not be_nil
-        response.should be_redirect
+        assigns(:preferences).should_not be_empty
+        response.should be_success
       end
     end
+    
   end
 end</diff>
      <filename>spec/controllers/admin/preferences_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -36,4 +36,11 @@ describe Preference do
       end.should change { Preference.get(&quot;theme&quot;, true) }
     end
   end
+  
+  describe &quot;#to_key_and_value_pair&quot; do
+    it &quot;should grab preferences and return key and pair value&quot; do
+      preferences = Preference.all.to_key_and_value_pair
+      preferences.should include([preferences(:theme).name, preferences(:theme).value])
+    end
+  end
 end
\ No newline at end of file</diff>
      <filename>spec/models/preference_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>app/views/admin/preferences/index.html.haml</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>cba812f95c2a262c88e563e1ee229d3af62e3491</id>
    </parent>
  </parents>
  <author>
    <name>Zach Inglis</name>
    <email>zach@lt3media.com</email>
  </author>
  <url>http://github.com/zachinglis/mouth/commit/92696cc6bd5c1dbb6c5b6e97e16bd610af7a2ab0</url>
  <id>92696cc6bd5c1dbb6c5b6e97e16bd610af7a2ab0</id>
  <committed-date>2008-08-09T18:35:06-07:00</committed-date>
  <authored-date>2008-08-09T18:35:06-07:00</authored-date>
  <message>Preferences are fully working now</message>
  <tree>96cdadcd2b6e1b791cbdbcb88b01c5a50867fe95</tree>
  <committer>
    <name>Zach Inglis</name>
    <email>zach@lt3media.com</email>
  </committer>
</commit>
