robzdc — 2013-03-15T18:43:11-04:00 — #1
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?
robzdc — 2013-03-15T19:08:48-04:00 — #2
I had to restart the server..
The weird thing is that Im in development environment...
markbrown4 — 2013-03-16T18:28:19-04:00 — #3
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.
robzdc — 2013-03-16T18:31:56-04:00 — #4
ohh, thanks, thats why then...
Im creating my functions in /lib