Can't convert nil into string

Hi all
I am gettng an error message:

can’t convert nil into string

here is my controller:

class GreetController < ApplicationController
def say_hi
@message= "Hello " + params[:textName]

and my viewer

Hello!!! <%= start_form_tag :controller=>'greet', :action=>'say_hi' %>

Enter Your N.: <%= text_field_tag :textName, :size=> 20 %>

<%= @message %>

<%= submit_tag( "Hello") %>

<%= end_form_tag %>

It works when I delete the “+ params[:textName]” in the controller. It
looks like it does not recognize the textbox.

How can I fix that?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs