public
Description: A social application that helps members create, discover and enhance a remarkable or outstanding thing of its kind
Homepage: http://carlbtanner.com
Clone URL: git://github.com/captproton/palooza.git
Search Repo:
Initial CRUD of recipes with supporting ingredients and instructions 
complete.
captproton (author)
Mon Jul 21 21:12:26 -0700 2008
commit  5f9ce7d2827b3f875009bd8f055758d7e78598b6
tree    89ab6912143aeacb4f9696f6a8572288520d3568
parent  aa022c3cd8e28f704580478dab02070187f79b17
...
8
9
10
11
 
12
13
14
...
8
9
10
 
11
12
13
14
0
@@ -8,7 +8,7 @@ class ApplicationController < ActionController::Base
0
   class AccessDenied < StandardError; end
0
 
0
   # Pick a unique cookie name to distinguish our session data from others'
0
- session :session_key => '_restful_auth_rspec_session_id'
0
+ session :session_key => '_99paloozast_session_id'
0
 
0
   # If you want timezones per-user, uncomment this:
0
   #before_filter :login_required
...
15
16
17
 
18
19
20
...
30
31
32
33
 
34
35
36
...
66
67
68
69
 
 
70
71
72
...
94
95
96
 
 
97
...
15
16
17
18
19
20
21
...
31
32
33
 
34
35
36
37
...
67
68
69
 
70
71
72
73
74
...
96
97
98
99
100
101
0
@@ -15,6 +15,7 @@ class RecipesController < ApplicationController
0
   def show
0
     @recipe = Recipe.find(params[:id])
0
     @comments = @recipe.comments
0
+ @ingredients = @recipe.ingredients.find(:all)
0
     @food_categories = FoodCategory.find(:all)
0
     @newcomment = Comment.new
0
     
0
@@ -30,7 +31,7 @@ class RecipesController < ApplicationController
0
   def new
0
       @recipe = Recipe.new
0
       @recipe.ingredients.build
0
- ## @recipe.instructions.build
0
+ @recipe.instructions.build
0
     respond_to do |format|
0
       format.html # new.html.erb
0
       format.xml { render :xml => @recipe }
0
@@ -66,7 +67,8 @@ class RecipesController < ApplicationController
0
   # PUT /recipes/1
0
   # PUT /recipes/1.xml
0
   def update
0
-
0
+ params[:recipe][:existing_ingredient_attributes] ||= {}
0
+
0
     @recipe = Recipe.find(params[:id])
0
     ## @cover = @recipe.cover
0
     ## @service = RecipeService.new(@recipe, @cover)
0
@@ -94,4 +96,6 @@ class RecipesController < ApplicationController
0
       format.xml { head :ok }
0
     end
0
   end
0
+
0
+
0
 end
...
1
 
 
 
 
 
2
3
4
...
1
2
3
4
5
6
7
8
9
0
@@ -1,4 +1,9 @@
0
 module ApplicationHelper
0
+ def page_title
0
+ title = @page_title ? "| #{@page_title}" : ''
0
+ %(Good Food #{title})
0
+ end
0
+
0
   
0
   # Show the local time
0
   def tz(time_at)
...
1
2
 
 
 
 
 
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
 
 
 
18
19
20
...
1
2
3
4
5
6
7
8
9
10
11
12
13
 
 
 
 
 
14
 
 
 
15
16
17
18
19
20
0
@@ -1,20 +1,20 @@
0
 module RecipesHelper
0
 
0
+ def page_classes
0
+ page_class = @page_classes ? "#{@page_classes}" : ''
0
+ %(class="#{page_class} recipes")
0
+ end
0
+
0
     def add_ingredient_link (full_description)
0
         link_to_function full_description do |page|
0
             page.insert_html :bottom, :ingredient_list, :partial => 'ingredient', :object => Ingredient.new
0
         end
0
     end
0
     
0
- def fields_for_instruction(instruction, &block)
0
- prefix = instruction.new_record? ? 'new' : 'existing'
0
- fields_for("recipe[#{prefix}_instruction_attributes][]", instruction, &block)
0
- end
0
-
0
     def add_instruction_link(description)
0
- link_to_function description do |page|
0
- page.insert_html :bottom, :instructions, :partial => 'instruction', :object => Instruction.new
0
- end
0
+ link_to_function description do |page|
0
+ page.insert_html :bottom, :instruction_list, :partial => 'instruction', :object => Instruction.new
0
+ end
0
     end
0
     
0
     ##def cover_for(recipe, size = :medium)
...
6
7
8
 
 
9
10
11
12
13
 
14
15
16
17
18
19
 
 
 
20
 
 
21
22
23
...
25
26
27
28
 
29
30
31
32
33
 
34
35
36
37
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
...
6
7
8
9
10
11
12
13
14
 
15
16
17
 
 
 
 
18
19
20
21
22
23
24
25
26
...
28
29
30
 
31
32
33
34
35
 
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
0
@@ -6,18 +6,21 @@ class Recipe < ActiveRecord::Base
0
     belongs_to :food_category
0
 
0
     validates_presence_of :name
0
+
0
+ ## DEPENDENT MODELS
0
     validates_associated :ingredients
0
     validates_associated :instructions
0
 
0
 
0
- after_update :save_instructions
0
+ ## after_update :save_instructions
0
     after_update :save_ingredients
0
     
0
- def new_ingredient_attributes=(ingredient_attributes)
0
- ingredient_attributes.each do |attributes|
0
- ingredients.build(attributes)
0
- end
0
+ def new_ingredient_attributes=(ingredient_attributes)
0
+ ingredient_attributes.each do |attributes|
0
+ ingredients.build(attributes)
0
       end
0
+ end
0
+
0
 
0
       def existing_ingredient_attributes=(ingredient_attributes)
0
         ingredients.reject(&:new_record?).each do |ingredient|
0
@@ -25,14 +28,62 @@ class Recipe < ActiveRecord::Base
0
           if attributes
0
             ingredient.attributes = attributes
0
           else
0
- ingredient.delete(task)
0
+ ingredients.delete(ingredient)
0
           end
0
         end
0
       end
0
 
0
- def save_ingredient
0
+ def save_ingredients
0
         ingredients.each do |ingredient|
0
           ingredient.save(false)
0
         end
0
       end
0
+
0
+
0
+ def existing_ingredient_attributes=(ingredient_attributes)
0
+ ingredients.reject(&:new_record?).each do |ingredient|
0
+ attributes = ingredient_attributes[ingredient.id.to_s]
0
+ if attributes
0
+ ingredient.attributes = attributes
0
+ else
0
+ ingredient.delete(ingredient)
0
+ end
0
+ end
0
+ end
0
+ def new_instruction_attributes=(instruction_attributes)
0
+ instruction_attributes.each do |attributes|
0
+ instructions.build(attributes)
0
+ end
0
+ end
0
+
0
+
0
+ def existing_instruction_attributes=(instruction_attributes)
0
+ instructions.reject(&:new_record?).each do |instruction|
0
+ attributes = instruction_attributes[instruction.id.to_s]
0
+ if attributes
0
+ instruction.attributes = attributes
0
+ else
0
+ instructions.delete(instruction)
0
+ end
0
+ end
0
+ end
0
+
0
+ def save_instructions
0
+ instructions.each do |instruction|
0
+ instruction.save(false)
0
+ end
0
+ end
0
+
0
+
0
+ def existing_instruction_attributes=(instruction_attributes)
0
+ instructions.reject(&:new_record?).each do |instruction|
0
+ attributes = instruction_attributes[instruction.id.to_s]
0
+ if attributes
0
+ instruction.attributes = attributes
0
+ else
0
+ instruction.delete(instruction)
0
+ end
0
+ end
0
+ end
0
+
0
 end
...
2
3
4
5
 
6
7
8
...
16
17
18
19
 
20
21
22
...
2
3
4
 
5
6
7
8
...
16
17
18
 
19
20
21
22
0
@@ -2,7 +2,7 @@
0
 <head profile="http://a9.com/-/spec/opensearch/1.1/">
0
   <meta name="generator" content="HTML Tidy for Mac OS X (vers 1st December 2004), see www.w3.org" />
0
 
0
- <title>Recipes - CHOW</title>
0
+ <title><%= page_title %> </title>
0
   <meta name="verify-v1" content="mvraDxxNdXUusnoBQ+q8Ty0e0c3cak3C7Pck1s+aQBI=" />
0
   <meta http-equiv="content-type" content="text/html; charset=utf-8" />
0
   <meta content="Recipes, cooking techniques, and news, updated daily. Devoted to the pleasure of food and drink." name="description" />
0
@@ -16,7 +16,7 @@
0
   <%= render :partial => '/shared/rss_feeds' %>
0
 </head>
0
 
0
-<body class="recipes_index recipes">
0
+<body <%= page_classes %> >
0
   <%= render :partial => '/shared/mobile_message' %>
0
 
0
   <div id="custom-doc" class="yui-t6">
...
1
2
3
4
5
6
7
8
 
 
 
 
 
 
 
9
10
11
12
13
14
15
16
17
18
19
20
21
22
...
 
1
2
3
 
 
 
 
4
5
6
7
8
9
10
11
 
 
 
 
 
 
 
 
 
 
 
 
 
0
@@ -1,22 +1,11 @@
0
- <li id="ingredient" class="ingredient_list_item" >
0
     <% new_or_existing = ingredient.new_record? ? 'new' : 'existing' %>
0
     <% prefix = "recipe[#{new_or_existing}_ingredient_attributes][]" %>
0
     <% fields_for prefix, ingredient do |ingredient_form| -%>
0
- <p>
0
- ingredient: <%= ingredient_form.text_area :full_description %>
0
- <%= link_to_function "remove", "$(this).up('.ingredient').remove()" %>
0
- </p>
0
+ <li class="ingredient_list_item" >
0
+ <img alt="Drag Ingredient"
0
+ class="instruction_num" src="/images/digits_nonum.gif" />
0
+ <%= ingredient_form.text_area :full_description, :class => "ingredient_field", :cols => 35, :rows => 1 %>
0
+ <%= link_to_function image_tag("recipes/btn_delete.gif"),
0
+ "this.up('.ingredient_list_item').remove()" %>
0
+ </li>
0
     <% end -%>  
0
- </li>
0
-
0
-<!-- ============== -->
0
-<div class="ingredient">
0
-<%# new_or_existing = ingredient.new_record? ? 'new' : 'existing' %>
0
-<%# prefix = "recipe[#{new_or_existing}_ingredient_attributes][]" %>
0
-<%# fields_for prefix, ingredient do |ingredient_form| -%>
0
-<p>
0
-<!-- ingredient: <%# ingredient_form.text_field :name %> -->
0
-<%# link_to_function "remove", "$(this).up('.ingredient').remove()" %>
0
-</p>
0
-<%# end -%>
0
-</div>
...
11
12
13
14
15
16
17
18
19
20
 
 
 
 
 
 
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
 
 
 
 
 
49
50
51
 
...
11
12
13
 
 
 
 
 
 
 
14
15
16
17
18
19
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
22
23
24
25
26
27
 
28
0
@@ -11,41 +11,18 @@
0
       </div>
0
       
0
       
0
- <fieldset>
0
- <label>Ingredients</label><br />
0
- <ol id="ingredient_list">
0
-
0
-
0
-
0
-<li id="ingredient_item_1" class="ingredient_list_item" style="" onMouseOut="this.style.backgroundColor='#ebf2f8';" onMouseOver="this.style.backgroundColor='#e0ebf1';">
0
+ <fieldset>
0
+ <label>Ingredients</label><br />
0
+ <ol id="ingredient_list">
0
+ <%= render :partial => 'ingredient', :collection => @recipe.ingredients %>
0
+ </ol>
0
+ </fieldset>
0
 
0
- <img alt="Drag Ingredient" class="instruction_num" src="http://www.chow.com/images/digits_nonum.20080715210329.gif" />
0
- <textarea class="ingredient_field" cols="35" id="ingredient[1]" name="ingredient[1]" rows="1"></textarea><a href="#" onclick="new Ajax.Request('/recipes/1/remove_ingredient', {asynchronous:true, evalScripts:true, onComplete:function(request){}, parameters:{ingredient_order:document.getElementById('ingredient_order').value}}); return false;"><img alt="Remove Ingredient" class="delete" src="http://www.chow.com/images/recipes/btn_delete.20080715210329.gif" /></a>
0
-
0
-</li>
0
-
0
-
0
-
0
-
0
-<%= render :partial => 'ingredient', :collection => @recipe.ingredients %>
0
- </ol>
0
- </fieldset>
0
-
0
- <input id="ingredient_order" name="ingredient[order]" type="hidden" value="1,2,3" />
0
-
0
- <div id="ingredient_adder">
0
- <p class="add"> <%= add_ingredient_link image_tag("/images/recipes/btn_add.gif", :alt=>"Add Another Ingredient", :class =>'add', :border=>0) %>&nbsp;&nbsp;Add an ingredient
0
- </p>
0
-
0
- </div>
0
-
0
- <div id="ingredient_sortable_div">
0
- <script type="text/javascript">
0
-//<![CDATA[
0
-Sortable.create("ingredient_list", {onUpdate:function(){new Ajax.Request('/recipes/sort_ingredients', {asynchronous:true, evalScripts:true, parameters:Sortable.serialize("ingredient_list")})}})
0
-//]]>
0
-</script>
0
- </div>
0
+ <div id="ingredient_adder">
0
+ <p class="add">
0
+ <%= add_ingredient_link image_tag("recipes/btn_add.gif") %>&nbsp;&nbsp;Add an ingredient
0
+ </p>
0
+ </div>
0
       
0
       <div class="clear"></div>
0
- </div>
0
+ </div>
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
 
 
 
 
 
 
 
 
 
 
...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
0
@@ -1,29 +1,11 @@
0
-<% @instruction = instruction %>
0
-<%= error_messages_for :instruction %>
0
-
0
- <% fields_for_instruction(instruction) do |instruction_form| %>
0
-
0
- <li class="instruction_list_item">
0
-
0
- <div id="instruction_number_1" class="instruction_num">
0
- <img alt="#1)" src="/images/digits_p1.gif" />
0
- </div>
0
-
0
- <div class="instruction">
0
- <%= instruction_form.text_area :description, :rows => 3, :width => "38.5" %>
0
- <%= link_to_function image_tag("recipes/btn_delete.gif",
0
- :alt=>"Remove Instruction",
0
- :class =>'delete',
0
- :border=>0), "$(this).up('.instruction').remove()" %>
0
-
0
- <%= add_instruction_link image_tag("recipes/btn_add.gif",
0
- :alt=>"Add Another Ingredient",
0
- :class =>'add',
0
- :border=>0) %>
0
- &nbsp;&nbsp;Add an instruction
0
-
0
- </div>
0
-
0
- <div class="clear"></div>
0
- </li>
0
- <% end %>
0
\ No newline at end of file
0
+<% new_or_existing = instruction.new_record? ? 'new' : 'existing' %>
0
+<% prefix = "recipe[#{new_or_existing}_instruction_attributes][]" %>
0
+<% fields_for prefix, instruction do |instruction_form| -%>
0
+<li class="instruction_list_item" >
0
+ <img alt="Drag instruction"
0
+ class="instruction_num" src="/images/digits_nonum.gif" />
0
+ <%= instruction_form.text_area :description, :class => "instruction_field", :cols => 35, :rows => 1 %>
0
+ <%= link_to_function image_tag("recipes/btn_delete.gif"),
0
+ "this.up('.instruction_list_item').remove()" %>
0
+</li>
0
+<% end -%>
...
4
5
6
7
 
8
9
10
11
12
13
14
15
16
17
18
19
 
 
 
 
 
 
20
21
22
23
24
25
26
27
 
 
 
28
29
 
30
31
32
...
4
5
6
 
7
8
9
10
11
12
 
 
 
 
 
 
 
13
14
15
16
17
18
19
 
 
 
 
 
 
 
20
21
22
23
 
24
25
26
27
0
@@ -4,29 +4,24 @@
0
         <p>List one step at a time.</p>
0
     <ul>
0
       <li>drag-and-drop instructions by clicking and holding onto the instruction number</li>
0
- <li>the (+) and (x) buttons work just like they do with ingredients.</li>
0
+ <li>the (+) and (x) buttons work just like they do with instructions.</li>
0
     </ul>
0
       </div>
0
   
0
       
0
       
0
- <div id="instructions">
0
- <p class="head3">Instructions</p>
0
- <ol id="instruction_list">
0
- <%# render :partial => 'instruction', :collection => @recipe.instructions %>
0
-
0
- </ol>
0
- </div>
0
+ <fieldset>
0
+ <label>Instructions</label><br />
0
+ <ol id="instruction_list">
0
+ <%= render :partial => 'instruction', :collection => @recipe.instructions %>
0
+ </ol>
0
+ </fieldset>
0
 
0
- <div id="instruction_adder">
0
- <p class="add">
0
- <% add_instruction_link image_tag("recipes/btn_add.gif",
0
- :alt=>"Add Another Ingredient",
0
- :class =>'add',
0
- :border=>0) %>
0
- &nbsp;&nbsp;Add an instruction
0
+ <div id="instruction_adder">
0
+ <p class="add">
0
+ <%= add_instruction_link image_tag("recipes/btn_add.gif") %>&nbsp;&nbsp;Add an instruction
0
       </p>
0
- </div>
0
+ </div>
0
 
0
       <div class="clear"></div>
0
     </div>
...
 
 
 
 
 
1
2
3
...
7
8
9
10
 
11
12
13
...
1
2
3
4
5
6
7
8
...
12
13
14
 
15
16
17
18
0
@@ -1,3 +1,8 @@
0
+<% if controller.action_name == 'new'
0
+ image_file = 'btn_agree_publish'
0
+else
0
+ image_file = 'btn_save'
0
+end %>
0
     <div class="ur_module">
0
       <div class="submit_by">
0
 
0
@@ -7,7 +12,7 @@
0
         <p class="head3">All Done? Publish your recipe!</p>
0
         <p class="terms"><a href="#" onclick="new Effect.Appear('recipe_terms'); new Ajax.Request('/recipes/get_terms', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.ScrollTo('recipe_terms', {offset: -20});}}); return false;">Please read our Terms &amp; Conditions before publishing</a>.</p>
0
 
0
- <%= image_submit_tag("/images/recipes/btn_agree_publish.gif") %>
0
+ <%= image_submit_tag("/images/recipes/" + image_file + ".gif") %>
0
 
0
       </div>
0
 
...
8
9
10
11
 
12
13
14
15
 
16
17
18
19
20
 
21
22
23
...
8
9
10
 
11
12
13
14
 
15
16
17
18
19
 
20
21
22
23
0
@@ -8,16 +8,16 @@
0
       <fieldset>
0
         <div class="multi_field fl">
0
           <label>Total Time</label><br />
0
- <%= instruction_form.text_area :total_time, :cols => 40, :rows => 1, :id => "time" %>
0
+ <%= text_area(:recipe, :total_time, :size => "40x1", :class => "text_field") %>
0
         </div>
0
         <div class="multi_field">
0
           <label>Active Time</label><br />
0
- <%= instruction_form.text_area :active_time, :cols => 40, :rows => 1, :id => "active_time" %>
0
+ <%= text_area(:recipe, :active_time, :cols => 40, :rows => 1, :id => "active_time", :class => "text_field") %>
0
         
0
         </div>
0
         <div class="multi_field fl">
0
           <label>Makes</label><br />
0
- <%= instruction_form.text_area :serves, :cols => 40, :rows => 1, :id => "servings" %>
0
+ <%= text_area(:recipe, :serves, :cols => 40, :rows => 1, :id => "servings", :class => "text_field") %>
0
         </div>
0
       </fieldset>
0
 
...
1
 
 
 
 
2
 
 
 
 
 
 
 
 
 
3
4
5
6
7
 
 
 
8
9
10
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
 
 
 
16
17
18
19
 
 
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
0
@@ -1,10 +1,54 @@
0
-<h1>Editing recipe</h1>
0
+<% @page_title = @recipe.name %>
0
+<% @page_classes = "mobile recipes_edit recipes_edit" %>
0
+<div id="submit_recipe">
0
+<div class="bg_white" id="yui-main">
0
 
0
+ <p class="head1">
0
+ <strong>Edit your Recipe</strong>
0
+ <img src="/images/recipes/beta.gif" alt="beta"/>
0
+ </p>
0
+
0
+ <p class="intro">Publish your recipes on CHOW! Just fill out the form, submit it, and you'll be able to share your recipes with the world. You can even upload a photo of your masterpieces.</p>
0
+
0
+ <%= error_messages_for :recipe, :cover %>
0
+ <% form_for(@recipe, :html => { :multipart => true }) do |f| %>
0
 
0
-<% form_for :recipe, :url => recipe_path(@recipe), :html => { :method => 'put' } do |f| %>
0
- <%= render :partial => 'fields', :locals => { :f => f } %>
0
- <p><%= submit_tag "Update Recipe" %></p>
0
-<% end %>
0
+ <%# render :partial => 'originalform', :locals => { :f => f } %>
0
+
0
+ <%# render :partial => 'hidden_inputs', :locals => { :f => f } %>
0
 
0
-<%= link_to 'Show', @recipe %> |
0
-<%= link_to 'Back', recipes_path %>
0
+ <%= render :partial => 'recipe_name', :locals => { :f => f } %>
0
+ <%= render :partial => 'recipe_categories', :locals => { :f => f } %>
0
+
0
+
0
+ <%= render :partial => 'introduction', :locals => { :f => f } %>
0
+
0
+
0
+ <%= render :partial => 'ingredients', :locals => { :f => f } %>
0
+ <%= render :partial => 'instructions', :locals => { :f => f } %>
0
+
0
+ <%= render :partial => 'time_makes', :locals => { :f => f } %>
0
+
0
+ <%# render :partial => 'photo', :locals => { :f => f } %>
0
+
0
+ <%# render :partial => 'tag', :locals => { :f => f } %>
0
+
0
+ <%# render :partial => 'goes_with', :locals => { :f => f } %>
0
+
0
+ <%# render :partial => 'related_story', :locals => { :f => f } %>
0
+
0
+
0
+
0
+ <%= render :partial => 'submit_button', :locals => { :f => f } %>
0
+
0
+ <div id="recipe_terms" class="ur_module" style="display:none;"></div>
0
+ </div> </div>
0
+
0
+ </div>
0
+
0
+ <% end %>
0
+
0
+
0
+
0
+</div>
0
+</div>
...
 
 
 
1
2
3
...
21
22
23
24
25
26
27
28
29
30
 
 
 
31
32
33
...
1
2
3
4
5
6
...
24
25
26
 
 
 
 
 
 
 
27
28
29
30
31
32
0
@@ -1,3 +1,6 @@
0
+<% @page_title = @recipe.name %>
0
+<% @page_classes = "mobile recipes_new recipes_new" %>
0
+
0
 <div id="submit_recipe">
0
 <div class="bg_white" id="yui-main">
0
 
0
@@ -21,13 +24,9 @@
0
 
0
   <%= render :partial => 'introduction', :locals => { :f => f } %>
0
 
0
- <fieldset>
0
- <label>Ingredients</label><br />
0
- <ol id="ingredient_list">
0
- <%= render :partial => 'ingredient', :collection => @recipe.ingredients %>
0
- </ol>
0
- <%= add_ingredient_link "Add an ingredient" %>
0
- <%# render :partial => 'instructions', :locals => { :f => f } %>
0
+
0
+ <%= render :partial => 'ingredients', :locals => { :f => f } %>
0
+ <%= render :partial => 'instructions', :locals => { :f => f } %>
0
 
0
   <%= render :partial => 'time_makes', :locals => { :f => f } %>
0
 
...
 
 
1
2
3
...
8
9
10
11
 
12
13
14
...
46
47
48
49
 
50
51
 
52
53
54
...
1
2
3
4
5
...
10
11
12
 
13
14
15
16
...
48
49
50
 
51
52
 
53
54
55
56
0
@@ -1,3 +1,5 @@
0
+<% @page_title = @recipe.name %>
0
+<% @page_classes = "recipes_show" %>
0
     <div id="bd">
0
       <div id="horizontal_ad">
0
         <%= render :partial => 'recipes/show/horizontal_add_inner' %>
0
@@ -8,7 +10,7 @@
0
           <div id="recipes">
0
             <div id="col1">
0
               <div id="category">
0
- <%= render :partial => '/recipes/show/category_inner' %>
0
+ <%= render :partial => '/recipes/show/category_inner', :object => @recipe %>
0
               </div><!--#header-->
0
 
0
               <div id="col1a">
0
@@ -46,9 +48,9 @@
0
 </textarea>
0
                       </div><input class="button" name="commit" type="submit" value="Submit Comment" />
0
 
0
- <div class="email_comments">
0
+ <!-- div class="email_comments">
0
                         Email me when there are new comments <input id="notify" name="notify" type="checkbox" value="1" />
0
- </div>
0
+ </div -->
0
                     </form>
0
 
0
                     <div class="clear"></div>
...
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
 
 
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
...
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
 
 
190
191
192
...
83
84
85
 
86
87
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
89
90
91
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
93
94
...
97
98
99
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
101
102
103
104
0
@@ -83,85 +83,12 @@
0
                   </div>
0
 
0
                   <div id="ingredients">
0
- <h4>For the biscuits:</h4>
0
 
0
                     <ul>
0
- <li>
0
- <p>1 cup plus 2 tablespoons all-purpose flour</p>
0
- </li>
0
-
0
- <li>
0
- <p>2 tablespoons packed light brown sugar</p>
0
- </li>
0
-
0
- <li>
0
- <p>1 1/2 teaspoons baking powder</p>
0
- </li>
0
-
0
- <li>
0
- <p>1/4 teaspoon baking soda</p>
0
- </li>
0
-
0
- <li>
0
- <p>1/4 teaspoon kosher salt</p>
0
- </li>
0
-
0
- <li>
0
- <p>4 tablespoons unsalted butter (1/2 stick), frozen</p>
0
- </li>
0
-
0
- <li>
0
- <p>1/4 cup sour cream</p>
0
- </li>
0
-
0
- <li>
0
- <p>2 tablespoons heavy cream</p>
0
-