<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>features/support/app/db/migrate/20091103193154_pepino_name_field_is_now_title.rb</filename>
    </added>
    <added>
      <filename>features/support/app/db/schema.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -5,7 +5,6 @@ features/support/app/log
 features/support/app/tmp
 features/support/app/vendor
 features/support/app/script
-features/support/app/db/schema.rb
 features/support/app/db/*.sqlite3
 features/support/app/caracteristicas/
 features/support/app/lib/tasks/mundo_pepino.rake</diff>
      <filename>.gitignore</filename>
    </modified>
    <modified>
      <diff>@@ -2,6 +2,11 @@
 require(File.join(File.dirname(__FILE__), 'features', 'support', 'app', 'config', 'boot'))
 require 'rake'
 
+# Commented to avoid that runcoderun uses &quot;test&quot; as default task
+# require 'rake/testtask'
+# require 'rake/rdoctask'
+# require 'tasks/rails'
+
 unless ARGV.any? {|a| a =~ /^gems/}
   begin
     require 'cucumber/rake/task'</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -24,9 +24,16 @@ Caracter&#237;stica: implementaci&#243;n de pasos habituales
        Y que dicho tomate tiene como di&#225;metro &quot;97&quot; mil&#237;metros
        Y que el tomate &quot;B&quot; tiene como variedad &quot;Ramo&quot;
        Y que dicho tomate tiene como di&#225;metro &quot;43&quot; mil&#237;metros
+       Y que el bancal &quot;Pepinos&quot; tiene los siguientes pepinos:
+         | nombre | peso | longitud | di&#225;metro |
+         |     P1 |   30 |      115 |       23 |
+         |     P2 |   23 |       35 |       12 |
+         |     P3 |   41 |      135 |       18 |
+       Y que el Pepino &quot;P1&quot; tiene como di&#225;metro &quot;12&quot; mil&#237;metros
     Entonces tenemos en bbdd un huerto llamado &quot;Hortalizas&quot;
            Y tenemos en bbdd 7 acelgas
            Y tenemos en bbdd 4 tomates
+           Y tenemos en bbdd 3 pepinos
            Y el huerto &quot;Hortalizas&quot; tiene en bbdd un bancal &quot;Acelgas&quot;
            Y el bancal &quot;Acelgas&quot; tiene en bbdd siete acelgas
            Y tiene en bbdd una acelga &quot;A&quot;
@@ -37,3 +44,9 @@ Caracter&#237;stica: implementaci&#243;n de pasos habituales
            Y tiene en bbdd cuatro tomates
            Y el tomate &quot;A&quot; tiene en bbdd como variedad &quot;Raf&quot;
            Y el tomate &quot;A&quot; tiene en bbdd como di&#225;metro &quot;97&quot; mil&#237;metros
+           Y el bancal &quot;Pepinos&quot; tiene en bbdd tres pepinos
+           Y el bancal &quot;Pepinos&quot; tiene en bbdd un pepino &quot;P1&quot;
+           Y tiene en bbdd un pepino &quot;P2&quot;
+           Y tiene en bbdd un pepino &quot;P3&quot;
+           Y el pepino &quot;P1&quot; tiene en bbdd como di&#225;metro &quot;12&quot; mil&#237;metros
+           Y tiene en bbdd como peso &quot;30&quot; gramos</diff>
      <filename>features/es_ES/mundo-pepino.feature</filename>
    </modified>
    <modified>
      <diff>@@ -35,13 +35,13 @@ MundoPepino.configure do |config|
     /^huerto de nacimiento$/i   =&gt; Orchard
   }
   config.field_mappings = {
-    /^[&#193;&#225;a]reas?$/i    =&gt; :area,
-    /^color(es)?$/i   =&gt; :color,
-    /^latitud(es)?$/i =&gt; :latitude,
-    /^longitud(es)?/i =&gt; :length,
-    /^pesos?/i        =&gt; :weight,
-    /^di[&#225;a]metros?/i =&gt; :diameter,
-    /^matas?$/i       =&gt; :plants,
+    /^[&#193;&#225;a]reas?$/i              =&gt; :area,
+    /^color(es)?$/i              =&gt; :color,
+    /^latitud(es)?$/i            =&gt; :latitude,
+    /^longitud(es)?/i            =&gt; :length,
+    /^pesos?/i                   =&gt; :weight,
+    /^di[&#225;a]metros?/i            =&gt; :diameter,
+    /^matas?$/i                  =&gt; :plants,
     /^variedad(es)?$/i           =&gt; :variety,
     /^campos? de texto/i         =&gt; :text_field,
     /^[&#225;a]reas? de texto/i       =&gt; :textarea,
@@ -58,7 +58,8 @@ MundoPepino.configure do |config|
     /^huerto de nacimiento$/i    =&gt; :orchard_of_birth,
     /^hora de comenzar a regar$/i =&gt; :start_watering,
     /^hora de terminar de regar$/i =&gt; :stop_watering,
-    /^precio$/i                  =&gt; :price
+    /^precio$/i                  =&gt; :price,
+    /^Pepino::nombre$/i          =&gt; :title
   }
   config.relation_model_mappings = {
     /^orchard_of_birth$/i =&gt; Orchard</diff>
      <filename>features/step_definitions/es_ES.rb</filename>
    </modified>
    <modified>
      <diff></diff>
      <filename>features/support/app/db/test.sqlite3</filename>
    </modified>
    <modified>
      <diff>@@ -29,8 +29,10 @@ module MundoPepino
         children_model = params[:children_model].to_unquoted.to_model
         resources = (mentioned.is_a?(Array) ? mentioned : [mentioned])
         resources.each do |resource|
+          options = parent_options(resource, children_model)
+          options[:model] = children_model
           add_resource children_model, 
-            translated_hashes(params[:step_table].raw, parent_options(resource, children_model))
+            translated_hashes(params[:step_table].raw, options)
         end
       end
     end</diff>
      <filename>lib/mundo_pepino/implementations.rb</filename>
    </modified>
    <modified>
      <diff>@@ -103,7 +103,7 @@ module MundoPepino
     def last_mentioned_should_have_value(campo, valor)
       res = last_mentioned
       if child_model = campo.to_model
-        child = child_model.find_by_name(valor)
+        child = child_model.send &quot;find_by_#{field_for(child_model)}&quot;, name
         child_field = campo.to_field || child_model.name.underscore
         (res.send child_field).should == child
       elsif field = field_for(res.class, campo)
@@ -115,7 +115,7 @@ module MundoPepino
     
     def last_mentioned_should_have_child(child, name)
       if child_model = child.to_model
-        child = child_model.find_by_name(name)
+        child = child_model.send &quot;find_by_#{field_for(child_model)}&quot;, name
         (last_mentioned.send child_model.table_name).detect do |c|
           c.id == child.id 
         end.should_not be_nil</diff>
      <filename>lib/mundo_pepino/implementations_api.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>3c33212cc9ed15e132666a4dd5a3e5636bcfcd62</id>
    </parent>
  </parents>
  <author>
    <name>Nando</name>
    <email>fernando.garcia@the-cocktail.com</email>
  </author>
  <url>http://github.com/nando/mundo-pepino/commit/9e0c5ed959f4030acd1b131e4084092ee8492b02</url>
  <id>9e0c5ed959f4030acd1b131e4084092ee8492b02</id>
  <committed-date>2009-11-03T12:25:17-08:00</committed-date>
  <authored-date>2009-11-03T12:20:42-08:00</authored-date>
  <message>La b&#250;squeda del elemento hijo se realiza con un find_by por el campo
mapeado en lugar de fijarlo a find_by_name (v&#237;a Paco Guzm&#225;n)</message>
  <tree>b6a64475650ced8241161d9f73866fd127a221fd</tree>
  <committer>
    <name>Nando</name>
    <email>fernando.garcia@the-cocktail.com</email>
  </committer>
</commit>
