Displaying 1 result from an estimated 1 matches for "beerarray".
Did you mean:
beadarray
2013 Sep 02
1
Problem with Filling Tables.
....string :name
t.text :description
t.timestamps
end
end
end
#Beer Model
class Beer < ActiveRecord::Base
belongs_to :style
end
#Style Model
class Style < ActiveRecord::Base
has_many :beers
def self.makeStyles
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...