require 'sha1' class ListController < ApplicationController def index @list = [1, "string", :symbol, ['list']] end def shopping_list @list = [ListItem.new(4, 'aspirin'), ListItem.new(199, 'succotash')] end end class ListItem attr_accessor :name, :id def initialize(id, name) @id, @name = id, name end end