Hi: I''m reading and learning from the Rails tutorial at [1] but not building the sample application instead I''m trying to build my own. After generate all the migration and build the main classes for Models I made some modifications to them in order to build relationship between tables now I think that I need to run some command to generate the scaffold again with proper relations, exists such command? I''m lost [1] http://ruby.railstutorial.org/ -- Ing. Reynier Perez Mira eMail: reynierpm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, reynierpm-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org Skype: reynierpm Mobile: +58 424.180.5609 Site: http://reynierpm.site90.com -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Sun, Mar 4, 2012 at 1:49 AM, ReynierPM <reynierpm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi: > I''m reading and learning from the Rails tutorial at [1] but not building the > sample application instead I''m trying to build my own. After generate all > the migration and build the main classes for Models I made some > modifications to them in order to build relationship between tables now I > think that I need to run some command to generate the scaffold again with > proper relations, exists such command? I''m lostIf I understand well, the scaffold for the views will not automatically build forms that work with related tables (it will simply show the "parent_id"). At a certain point, you have to start building your own forms.You might look at "simple_form" with associations to handle forms with associations. HTH, Peter -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
The first mistake any rails tutorial does is to teach how to scaffold. Only when you write the classes and views yourself, you''ll understand what they exactly do. On 3/4/12, Peter Vandenabeele <peter-jNuWw7i2w7syMbTcgqFhxg@public.gmane.org> wrote:> On Sun, Mar 4, 2012 at 1:49 AM, ReynierPM <reynierpm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> Hi: >> I''m reading and learning from the Rails tutorial at [1] but not building >> the >> sample application instead I''m trying to build my own. After generate all >> the migration and build the main classes for Models I made some >> modifications to them in order to build relationship between tables now I >> think that I need to run some command to generate the scaffold again with >> proper relations, exists such command? I''m lost > > If I understand well, the scaffold for the views will not automatically > build > forms that work with related tables (it will simply show the "parent_id"). > At a certain point, you have to start building your own forms.You might > look at "simple_form" with associations to handle forms with associations. > > HTH, > > Peter > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 4 March 2012 00:49, ReynierPM <reynierpm-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi: > I''m reading and learning from the Rails tutorial at [1] but not building the > sample application instead I''m trying to build my own. After generate all > the migration and build the main classes for Models I made some > modifications to them in order to build relationship between tables now I > think that I need to run some command to generate the scaffold again with > proper relations, exists such command? I''m lost > > [1] http://ruby.railstutorial.org/I suggest that you should work right through the tutorial exactly as written first. Then start with your own app. In this case for example the tutorial will show you how to add further fields to database and views, after scaffolding, so you will know how to do it for yourself. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.