Hello - I am trying to create a simple array with my todos_controller.rb and index.html.erb files.
Here is what i have in my controller:
class TodosController < ApplicationController
def index
@todo_array = [ "Buy Milk", "Buy Soap", "Draw Money" ]
end
end
Here is what i have in my Index file:
<title>Shared Todo App </title>
<h1>Shared Todo App</h1>
<p>All your todos here</p>
<ul>
<% @todo_array.each do |t| %>
<li> <%= puts t %> </li>
<% end %>
When i start up the server to view the page the array is not being displayed correctly. Can someone point me in the right direction?