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.
- Installed NetBeans 6.8
- Installed MySQL 5.5
- Created my first project called “company”
- Generated a model “employee”
- Edited the employees.rb file to include 3 new
columns: :name, :string; :hiredate, :date; :salary, :float
- Executed the migrate rake task which successfully created the table
employee on the mysql database with these fields.
- Generated a scaffold called “employee”.
Then I opened my browser and went to http://localhost:8080/employees/new
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
When I click on the Edit button, it says “successfully updated” but
still does not show the fields.
What am I missing?