You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
336 B

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