Skip to content

Conversation

moserrya
Copy link

@moserrya moserrya commented Jan 7, 2013

Deployed here: http://calm-river-3728.herokuapp.com

Implemented the Ryan Facts using POST and GET to demonstrate to myself the difference between these two operations; POST made the most sense with the randomizer button I added to the deployed version so this is the one you will see.

Copy link
Member

Choose a reason for hiding this comment

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

Check out this awesome rubiness:

@ryan_fact = ryan_facts.sample

Check it out! http://rubyfiddle.com/riddles/3b682

Copy link
Author

Choose a reason for hiding this comment

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

That is awesome! Thank you for pointing that out.

On Jan 14, 2013, at 10:23 PM, Jesse Wolgamott notifications@github.com wrote:

In theweb.rb:

@@ -16,3 +16,12 @@
@the_number = rand(number_as_string)
erb :number
end
+
+post '/about' do

  • ryan_facts = ['Chuck Norris wears a Ryan Moser jersey',
  •                                        'Ryan is likely to have a squid on his head',
    
  •                                        'Ryan likes to do math for fun and profit', 
    
  •                                        'The creature Ryan most resembles is a box turtle']
    
  • @ryan_fact = ryan_facts[rand( ryan_facts.length )]
    Check out this awesome rubiness:

@ryan_fact = ryan_facts.sample
Check it out! http://rubyfiddle.com/riddles/3b682


Reply to this email directly or view it on GitHub.

@jwo
Copy link
Member

jwo commented Jan 15, 2013

Looks great! felt like I learned a lot about ryan!

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