Forum: Ruby on Rails clarify

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
dotnet java developer (Guest)
on 2006-03-09 11:14
(Received via mailing list)
im learning rails and i got a error while writing a sample code.

Script :

class GuestBookController < ActionController::Base
  def index
     @entry = GuestBook.find_all
  def list_parameters
     params = request.parameters
     render :text=>"Parameters #{params}"

  def list
    params = request.parameters
    @entry =[:name])
    redirect_to :action => "index"


i get the error " undefined method `stringify_keys!' for "name1":String
while the list function is executed

"name1" which i get in the error is the value which i gave for the field


cud u help me to get rid of the error ?
Mikkel B. (Guest)
on 2006-03-09 11:35
(Received via mailing list)
params is an already existing attribute, could give you some might want to rename it...
On Thursday, March 09, 2006, at 2:42 PM, dotnet java developer wrote:
>     params = request.parameters
>cud u help me to get rid of the error ?
>Rails mailing list

Mikkel B.    - Football Portal(DK) - Football News(DK)      - Buy Old Stuff!(DK)
Norman T. (Guest)
on 2006-03-09 11:41
(Received via mailing list)
Am Donnerstag, den 09.03.2006, 14:42 +0530 schrieb dotnet java
>      params = request.parameters
> cud u help me to get rid of the error ?
The first line of your list method is redundant, because Rails already
provides the request parameter hash in the variable (actual a method)
params. Just drop this line. Maybe this solves it.

You are not saying on wich line the error occurs, but i guess it is line
two @entry =[:name]), isn't it?

Norman T.
This topic is locked and can not be replied to.