undefined method `stringify_keys!' for "":String

i have an error
        undefined method `stringify_keys!' for "":String

my view is given below

<%= form_tag :action => 'resolve_create', :resolve => @resolve %>
  <p>resolution:<br />
  <%= text_area 'resolve','content', :cols => 40, :rows => 12 %></p>

<%= submit_tag "save" %>

what is dat error and how can i solve them?
can any one help me....

thanks

hi

Give me ur controller code.

thanks
seenu

srinivasan sakthivel wrote:

hi

Give me ur controller code.

thanks
seenu

On Thu, Oct 22, 2009 at 1:54 PM, Ralu rm

  def update

    @ticket = Ticket.find(params[:id])
    if @ticket.update_attributes(params[:ticket])
        redirect_to :action => 'list'
    else
  redirect_to :action => 'edit'
    end
  end
  def resolve
    @ticket = Ticket.find(params[:id])
    @category = Category.find(params[:id2])
    @urgency = Urgency.find(params[:id3])
    @resolve = Resolve.new
  end

  def resolve_create
  @resolve = Resolve.new(params[:resolve1])
  if @resolve.save
    redirect_to :action => 'list'
  else
    redirect_to :action => 'resolve'
  end
  end

end

this is the part of controller code...

def resolve_create
@resolve = Resolve.new(params[:resolve1])
if @resolve.save
redirect_to :action => ‘list’
else
render :action => ‘resolve’
end
end

u can try the above code…

Thanks
seenu.

Otherwise u can try this one

def resolve_create

@resolve = Resolve.new()
@resolve.content = params[:resolve][:content]

if @resolve.save

redirect_to :action => 'list'

else

render :action => ‘resolve’

end

end

Thanks
seenu

  def resolve_create
  @resolve = Resolve.new(params[:resolve1])
  if @resolve.save
    redirect_to :action => 'list'
  else
    redirect_to :action => 'resolve'
  end
  end

Problem is in parameters arguments...

It should be params[:resolve] ....not params[:resolve1]...

Thanks
Brijesh Shah

Sijo k g wrote:

Hi Ralu rm

i have an error
        undefined method `stringify_keys!' for "":String

The reason for this error is in the line

<%= form_tag :action => 'resolve_create', :resolve => @resolve %>

   Since this will generate source like
action="/controller/resolve_create?resolve="

And in resolve_create what you are trying is

@resolve = Resolve.new(params[:resolve])
if @resolve.save

   Here the error is .Why are you passing :resolve => @resolve ?

Sijo

then how can i pass the value resolve which iam getting from the user ?

is dat iam going in a rubbish way...???

Max Williams wrote:

Oops, sorry, that text area in the amended form should be

<%= f.text_area :content, :cols => 40, :rows => 12 %></p>

thanks guys
nw its working fine...

Ralu rm wrote:

Max Williams wrote:

Oops, sorry, that text area in the amended form should be

<%= f.text_area :content, :cols => 40, :rows => 12 %></p>

but in dat form_for .... der is no action ,
will it directly go to :action => 'create'??

Ralu rm wrote:

Max Williams wrote:

dude, there's an api for a reason!! I personally like the version at
http://railsbrain.com, why not go and read it

am just a beginner,
dats y dat quest buddy...
anyway thanks for the link!

I know you're a beginner, but if you know the name of the method that
you have a question about, your first stop should always be the api.