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
Ing. Reynier Perez M.
eMail: [email protected], [email protected]
Skype: reynierpm
Mobile: +58 424.180.5609
Site: http://reynierpm.site90.com
On Sun, Mar 4, 2012 at 1:49 AM, ReynierPM [email protected] 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
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 4 March 2012 00:49, ReynierPM [email protected] 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