Hi All,
I created a new rails application using rails 1.0. I used “ruby
script\generate scaffold” for each of my tables. This worked on all but
2 of my tables. When I go to the new or edit action of my requests or
admins table, I get the error below.
On one table called admins I hadn’t followed the correct naming
convention and wasn’t able to edit or create records. However, once I
modified the table and re-created the scaffold it worked. However,
I’ve double checked my naming conventions on my requests table and can’t
figure this out. I also cannot find the line “<%=h
@request.parameters[“controller”].capitalize if” in any files. I’ve
searched the mailing list and google and found many similar issues but I
don’t see this particular issue or any answers. Any help would be
appreciated.
thanks,
Leo
Here’s the error I’m getting
NoMethodError in Requests#new
Showing
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/action_controller/templates/rescues/template_error.rhtml
where line #3 raised:
undefined method `parameters’ for #Request:0x393ab60
Extracted source (around line #3):
1:
2: <%=h @exception.original_exception.class.to_s %> in
3: <%=h @request.parameters[“controller”].capitalize if
@request.parameters[“controller”]%>#<%=h @request.parameters[“action”]
%>
4:
5:
6:
Table Definition:
mysql> desc requests;
±-----------------±------------±-----±----±--------±---------------+
| Field | Type | Null | Key | Default | Extra |
±-----------------±------------±-----±----±--------±---------------+
| id | int(11) | NO | PRI | NULL | auto_increment |
| problemsite_id | int(11) | NO | | | |
| project_id | int(11) | NO | | | |
| requesttype_id | int(11) | NO | | | |
| ostype_id | int(11) | NO | | | |
| requeststatus_id | int(11) | NO | | | |
| description | text | NO | | | |
| actiontaken | text | YES | | NULL | |
| admin_id | int(11) | NO | | | |
| wwid | varchar(8) | NO | | | |
| idsid | varchar(8) | NO | | | |
| name | varchar(50) | NO | | | |
| email | varchar(50) | NO | | | |
| phone | varchar(30) | NO | | | |
| altphone | varchar(30) | YES | | NULL | |
| badgecolor | varchar(2) | YES | | NULL | |
| iscc | varchar(2) | NO | | | |
| orgu | varchar(50) | NO | | | |
±-----------------±------------±-----±----±--------±---------------+