Displaying 1 result from an estimated 1 matches for "list_styl".
Did you mean:
list_str
2013 Sep 02
1
Problem with Filling Tables.
...beer = Hash[:name => "individual beer"]
beerArray = [beer]
style = Hash[:beers => beerArray, :name => "beer style",
:description => "This is a beer style."]
styleArray = [style]
self.create_styles(styleArray)
end
def self.create_styles(list_styles)
list_styles.each do |s|
new_style = Style.create(name: s[:name], description:
s[:description])
new_style.save
list_styles[:beers].each do |b|
new_style.beers.create(name: b[:name])
new_style.beers.save
end
end
end
end
The parts in comme...