Skip to content

Instantly share code, notes, and snippets.

View AndyMoreland's full-sized avatar

Andrew Moreland AndyMoreland

View GitHub Profile
public static void main ()
{
int randomArray [] = new int [100];
Random num = new Random ();
for (int i = 0; i < 100; i++)
{
randomArray[i] = num.nextInt(100);
if (randomArray[i] < 10)
{
### In main model
# for each Beer object, there are some number 0-50 individual review objects, listed
# in the Tastes model
# For my "beer list" in my view, i need to search the child reviews, looking for particular
# phrases and return the results
#
# Any suggestions?
###
class Beer < ActiveRecord::Base