Created
March 29, 2012 02:40
-
-
Save austinbv/2232694 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Deck < ActiveRecord::Base | |
def show_card | |
# Why assign to an instance var??? | |
deck.first | |
end | |
def create_deck | |
# again why are you assigning | |
# also arrays have a destructive shuffle method | |
# | |
deck = (1..54).to_a.shuffle! | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment