Here is where my troubles begin. The webpage shows just a “Create”
button, without the labels and text fields for the fields name,
hiredate or salary.
If I click on the “Create” button, it says “created a new employee”
and creates a row with links “show”, “edit” and “destroy”. It does not
show the name, hiredate or salary.
When I checked the database, there is an empty row in the employees
table.
When I click on the Edit button, it says “successfully updated” but
still does not show the fields.
I am a newbie to RoR. I am struggling to find out why my first RoR
program does not show me the labels and the fields for my table.
This is what I did so far:
Installed RoR 1.8.6.
I suspect you mean ruby 1.8.6 and some other version of rails (since
there is no version 1.8.6)
[snip]
If I click on the “Create” button, it says “created a new employee”
and creates a row with links “show”, “edit” and “destroy”. It does not
show the name, hiredate or salary.
When I checked the database, there is an empty row in the employees
table.
When I click on the Edit button, it says “successfully updated” but
still does not show the fields.
What am I missing?
Scaffolding does not inspect your database - it will show controls/
labels for those attributes that you tell it about when you run the
scaffolding generator
Edited the employees.rb file to include 3 new
If I click on the “Create” button, it says “created a new employee”
and creates a row with links “show”, “edit” and “destroy”. It does not
show the name, hiredate or salary.
When I checked the database, there is an empty row in the employees
table.
When I click on the Edit button, it says “successfully updated” but
still does not show the fields.
What am I missing?
Have a look at the GettingStarted guide at
Colin
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.