search for: makestyl

Displaying 1 result from an estimated 1 matches for "makestyl".

Did you mean: makestr
2013 Sep 02
1
Problem with Filling Tables.
...veRecord::Migration def change create_table :styles do |t| t.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_...