I've been working on a Rails app as a sort of hobby, it's for a site that I'm prototyping for fun, and we'll see where it goes. I've been off and on, depending on the home schedule, but having a concrete goal helps in my effort to keep my chops up. My areas of focus right now are Ruby, Rails, AJAX, JavaScript (with the Dojo toolkit), as well as CSS and design (never my strong suit). The things I work on lately are quite fun and challenging, but have taken me away from heads-down web app coding for quite a while.
Anyhow, working with the project, pagination turns out to be deprecated in Rails. I grabbed the new plug-in, classic_pagination, but the first thing I got is a notice that it's dead code, and I should move to WillPaginate. I love working with Rails, but the capricious nature of open source does have its drawbacks! Anyhow, I'm working with it, it looks nice. I found a quick jump-start on a RailsCast episode dedicated to pagination, linked here. RailsCast is a fine resource, and I highly recommend it.
One thing I would point out, and something that I'm still working to change, is to wake up to the fact that Rails and Ruby let you pop open a console and work with your code while you code. Try things out, see what responses you get, and if it looks good, copy it into your codebase. As a Java monkey, this is still a foreign mode of operation. The point is, if you're used to coding Java like I am, get used to having that console open, and monkey with your code! Check out the RailsCast, and give WillPaginate a try.
No comments:
Post a Comment