Ever since I released Searchgasm I've been getting a lot of really cool feedback. I love when people contact me with a unique way they used Searchgasm or a challenging / cool new feature they would like to see added. Challenges are what make programming fun, to see what you are capable of. So here is my challenge for the day:

I've been having a lot of conversations via email with people using Searchgasm, that go like the following:

Some person: Hi Ben, How do I order by an order's total with Searchgasm?

Me: Cache the total in your database. Your idol, Ben

Some person: Before Searchgasm, I was just doing: Order.all(:order => "(quantity * price) ASC"). Is there a way to do this in Searchgasm?

Me: No, you shouldn't order data like that. ...long explanation of what to do.... Your idol, Ben

Some person: Thank you so much Ben, I can't thank you enough for everything you have done for me. You truly are my idol. There should be a statue in your honor.

Maybe it didn't go exactly like that, but you get the point. So instead of having to retype the "long explanation of what to do", I can just link them to this post:

This can be simple or complicated depending on how you calculate your total. Let's start with the simple:

Read the rest of this article...

Searchgasm 1.3.0 was released today and has some pretty cool features, mainly modifiers. I'm going to assume you know what Searchgasm is. If you don't, you're missing out. Take a quick glance at the readme on github, otherwise this article probably won't make a whole lot of sense.

Read the rest of this article...

Paginating, ordering, searching - no longer a pain in the ass

Maybe it's not a pain in the ass for you, maybe it is, or maybe it is and you don't know it. We'll never know. Either way, this tutorial is pain-in-the-ass free. Guaranteed. That's what this is all about, making your life easier when it comes to paginating, ordering, and searching. Things you do multiple times in almost every application.

My solution: Searchgasm. It has saved me a lot time, shortened my code, and ultimately given me the proper tools to paginate, order, and search my data. Hopefully it will do the same for you.

Read the rest of this article...

Searchgasm released!

September 1st, 2008

Searchgasm is orgasmic. Maybe not orgasmic, but you will get aroused. So go grab a towel and let's dive in.

Searchgasm's inspiration comes right from ActiveRecord. ActiveRecord lets you create objects that represent a record in the database, so why can't you create objects that represent searching the database? Now you can! It's searching, ordering, and pagination all in one.

Read the rest of this article...

Rubyforge is becoming increasingly outdated and less useful, thanks to GitHub. Rubyforge is mainly used as service for hoe/echoe and rubygems, not as a website or SCM. The days of manually uploading libraries or configuring a completely separate library to release your library (Hoe/Echoe) are over. Everything is starting to revolve around SCMs and become automatic.

Read the rest of this article...