andrewberls/swapmeet — pull request #1 by andrewberls (2012-10-29 01:25:23+00:00)
Title: Cleanup

This looks like a lot, but it's mostly just cleanup. This accomplishes a few things:

1) Style things with the CSS already in place. This mostly means pulling forms into the whiteboxes.

2) Reduce the two old bid routes to a single on (implemented on a member). Since it matches both GET and POST request, we have to do a quick check in the controller to handle it correctly, but apart from that I think the code is a lot cleaner. It also uses the `build` and `create` methods for building nested associations: i.e., `user.offers.build(params)` instead of `Offer.new(user_id: xx)` and so on.

3) Give titles to pages. This is the `provide` stuff at the top of most pages. I made up most of them, they're open to change and I couldn't think of one for `Offers#show`. It would make sense to do something like `Viewing offer: ` but since titles can get pretty long I'm not sure if that's a great idea. Maybe we add a title_preview method or whatever on offer to trim it down to a few words?