Comparison of String with Integer failed
If you have code like
@category_id=get_id_from_permalink(@params[:permalink_id]);
if @category_id >=1
....
end
comparison of String with 1 failed
To fix the error modify the above code so it is something like:
if @category_id.to_i >=1
....
end
2 Comments:
Will I have to add '.to_i' to every single instance of the variable I use?
Will I have to add '.to_i' to every single instance of the variable I use?
Post a Comment
<< Home