« February 2008 | Archives index
March 14, 2008
Speed up full-text indexing by doing a multi-row insert (wincent.com, 0d3e312)
This gets indexing up to an acceptable speed (a 10,000 word, 90,000 byte test article took less than a second to save in development mode, so production mode should be fast enough) so we can turn it back on again.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 8:37 PM
Fix the n+1 select problem in the tags implementation (wincent.com, 513d102)
When showing all items marked with a single tag (ie. the "show" action of the tags controller) or all items matching multiple tags (ie. the "search" action) we unfortunately had an n+1 SELECT problem because we had to inspect each Taggable instance to see if the user had access permissions to it.
Now we reduce the number of queries by grabbing all Taggables for a given taggable type in one hit. In other words, given 3 matching Articles and 10 matching Posts, we now do 2 queries during access checking rather than 13; and when we display the Taggables in the view there are no additional queries because the Taggables have already been fetched.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 2:19 PM
March 5, 2008
Add product creation with icon uploading (wincent.com, b970662)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 4:54 PM
Add extension and description to products model (migration) (wincent.com, 4eb5a36)
We don't need to store the full path to the icon file but we do need to store the icon file extension; with this we can reconstruct the full path on demand.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 4:52 PM
Update products link in navbar (wincent.com, 76cf73f)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 3:22 PM
Add products listing to index, links are permalinks (wincent.com, 63db015)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 2:40 PM
Fix products routing (wincent.com, b906a09)
I'd mistakenly used "map.resource" instead of "map.resources" which meant that things like "product_path" didn't work.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 10:17 AM
Assign found products for view (wincent.com, 98ab4ca)
This is a spec, the corresponding change was already made to the controller itself.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:45 AM
Teach products controller to find all products (wincent.com, b794161)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:42 AM
Add "index" action to products controller (wincent.com, 96c7e77)
And accompanying specs.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:38 AM
Add basic products controller specs (wincent.com, 4b2b9cb)
These are the shared application controller specs which all controllers should pass.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:30 AM
Validate uniqueness of product permalinks (wincent.com, a33cdbc)
This is the validation and the corresponding spec.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:28 AM
Require permalink on products model (wincent.com, 6c0c3b7)
Add the validation, corresponding spec, and example data for FixtureReplacement.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:24 AM
Add permalink column to products table (wincent.com, a4263df)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:23 AM
March 4, 2008
Add products controller and make it the default (root) route (wincent.com, e1580bd)
Requests for the application root (/) now get routed to this new products controller, and concretely the "index" action.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:50 PM
Add database-level constraint for product name uniqueness (wincent.com, 7805a54)
The Rails "uniqueness" validation is advisory only and is vulnerable to races, so add a database-level constraint to ensure integrity. (The Rails validation is about UI polish, not integrity.)
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:43 PM
Require product names to be unique (wincent.com, b023972)
Add validation and corresponding spec.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:42 PM
Require name in products model (wincent.com, e323bf2)
Add validation and corresponding spec.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:41 PM
Add example data for products model (wincent.com, 4109d10)
This is the FixtureReplacement data that will be required in order to pass validations.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:37 PM
Make sure product name is not nil (wincent.com, 8ef596d)
Add a database-level constraint.
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:36 PM
Create products model (wincent.com, 68a5a55)
This is just the bare skeleton created by "script/generate model".
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:35 PM
Add confirmation of emails (wincent.com, 78a395a)
And a bunch of other tweaks (ideally would have liked to break this up into a bunch of smaller commits but the clock is really ticking now).
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 9:32 PM
Trim robots.txt (wincent.com, 63cdd2e)
Keeping the default robots.txt file is a form of information leak ("this is a Rails application!").
Signed-off-by: Wincent Colaiuta <win@wincent.com>
Posted 4:20 PM


