box-o-sand/cookbook/015/hodgepodge/app/controllers/list_controller.rb
2011-08-10 22:51:14 -04:00

21 lines
336 B
Ruby

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