Skip to content

Added About Me#15

Open
pdai1y wants to merge 2 commits intoRubyoffRails:masterfrom
pdai1y:master
Open

Added About Me#15
pdai1y wants to merge 2 commits intoRubyoffRails:masterfrom
pdai1y:master

Conversation

@pdai1y
Copy link

@pdai1y pdai1y commented Apr 26, 2014

I kinda gutted the core of the app to stick within what you wanted us to do.. Will probably come back to this once I get to Choose Your Own Adventure and try that out.

http://fast-beyond-3125.herokuapp.com/

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some ruby coolness. Try

@random_likes = likes.sample

That'll return 1 random item, which is generally what you want. It won't be an array, so you may need to update that in the view.

And, to randomly sort an array, use .shuffle

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants