Variable Issue

Hi, I have an issue with a variable creating an array…

First, I initialize the array.

@data = []

Then I add the data.

@data << [...]

Then I display the results

<% @data.each do |data| %>

It works great… but if I change the variable name to @x it fails and display an empty array…
I dont understand why.
Any help please?

I had to restart the server…
The weird thing is that Im in development environment…

You should only need to restart the server if the code is an an initialiser that’s run when Rails is booted.
Any regular code in the /app directory will get run every time a page is loaded.

ohh, thanks, thats why then…
Im creating my functions in /lib