Concatenation


#1

I have this:

<%= @tech_standard.category + " " + @tech_standard.point + “.” +
@tech_standard.subpoint %>

I get this error:

cannot convert Fixnum into String

point and subpoint are number.

How do I concatenate those values?

Seth B.

Web Resources Coordinator

Kentucky Academy of Technology Education

Murray State University


#2

On Feb 13, 2006, at 2:40 PM, Buntin, Seth - KATE wrote:

cannot convert Fixnum into String

point and subpoint are number.

How do I concatenate those values?

@tech_standard.category + @tech_standard.point.to_s +
@tech_standard.subpoint.to_s

Or if you actually want to add the numbers first and then concatenate
their sum to the category string:

@tech_standard.category + (@tech_standard.point +
@tech_standard.subpoint).to_s


Jason P.