Follow me on Twitter Twitter_16
Subscribe to my RSS feed Rss_16
Posted almost 9 years ago

Poker tab

I just finished the newest addition to the site. You probably noticed the new ‘Poker’ tab. What is this? Well, I host a weekly poker game and thought that it would be nice to be able to have a tool that the players could use to track their stats. This new tab allows me to create tournaments and at that point people can RSVP to the tournament and track their buy-ins and winnings.

I knew I wanted to be able to do some graphing for statistics. I’ll probably add more later, but I learned how to use googlecharts which is a nice gem for interacting with the google charts API. I tried another version, but found it to be pretty buggy.

I also found calendar_date_select which is a nice gem that provides quick javascript based date picker for date fields in your forms.

It’s been awhile since I’ve played around with Javascript, so I decided to go through a bit of a refresher.

The edit page has a lot of dynamic updates. I used RJS for much of this, but ran into a few limitations. One of the limitations (maybe there’s a way around this, but I couldn’t find anything) is the RJS makes it a bit difficult to use CSS selectors to collect multiple elements. For example, I couldn’t find a way to easily get all elements that have an id attribute that ends with ‘xxxx.’

I’d bet that RJS provides this functionality, but I found a lot more documentation on prototype and was able to use it to suite my needs.

Anyway, I’m pretty happy with how it all turned out.

comments powered by Disqus