I've been working with a LOT of Javascript lately. And when I say "working with," what I mean is "finding scripts that will do what I want them to do and modifying as necessary." Wait, isn't this supposed to be a Ruby on Rails blog? What happened!?
I got back to work on my random video game name generator tonight. I basically wanted to style it a bit and find a way so that it would generate a new phrase whenever the page is reloaded and then provide a link to reload the page. Pretty easy to do with a Javascript code, but I'm not a huge fan of reloading the entire thing just to reload this bit of text. Probably a better way to handle this, right? Maybe an Ajax call? What do you guys suggest? This works but I don't like the look of it, I guess.
Anyway, here's a link to the app on Heroku:
Random Video Game Name Generator
I wanted to accomplish a few things with this project. First off, build a random name generator with Ruby, and then figure out how you run that code on the web. This was largely a matter of learning Sinatra, and when I say "learning," I mean reading a tutorial and talking to @jqr about it for a few minutes. Sinatra is like SO easy.
I've got plans for how I could expand it (don't I always? Other coders have this problem too, right?) such as allowing users to save names they especially like, then enter a short description of what the game would be like. Viewers could also look at games that had been saved, perhaps vote on them, look at most popular games, etc, etc.
I think it's getting easier for me to think about WHAT applications COULD do, now that I know a bit more about HOW they're built. That makes sense, right?
My name is Tyler. I'm learning Ruby on Rails. This is a blog for me to talk about what I've learned. I'm no longer completely new to Ruby and while I don't feel comfortable calling myself a coder or programmer yet, I am absolutely a Ruby Enthusiast and a Rails Fancier. I've been working with Ruby on Rails since February 1, 2011. You know that song about "lovin' every minute of it?" Bingo.
Showing posts with label applications. Show all posts
Showing posts with label applications. Show all posts
Monday, November 28, 2011
Subscribe to:
Posts (Atom)