arwong09/buddhabase — pull request #14 by glhuang (2014-12-08 09:50:56+00:00)
Title: Implement search functionality

Made several changes in this.

1. Implemented the search functionality to filter the collection based on a search term.

2. Setting the state (saved/unsaved) via the client-side, didn't seem very efficient and actually caused some issues when I was trying to save items.. Since we are creating an sku for an item upon a successful item post request, we should just use that to determine the saved state.

3. I think it's best if we actually render back something as opposed to nothing on a successful item post request. This also fixed the issue with when we save an item and the sku not automatically updating.

tl;dr

1. Search works.
2. SKU automatically updates when we save an item as opposed to just being blank and requiring us to refresh the page to see it generated in the item row.
3. Added in annotate gem