Recent Posts by eddie may
|
Jan 17, 2008
eddie may
5 posts
|
Topic: Advanced Rails Recipes / Suggestions for Recipes Last one, I promise! A clear explanation and example of the use of dynamic vs static scaffolding. Thanks |
|
Jan 17, 2008
eddie may
5 posts
|
Topic: Advanced Rails Recipes / Suggestions for Recipes Ok, this may be too ambitious for a recipe or even completely off topic, but here goes anyway! Imagine a situation where you need to create an application for selling a multiplicity of different products – cars, motorbikes, paintings, antiques, etc, etc. Each product has different attributes – cars have a model and manufacturer, paintings have an artist & title. Similar (manufacturer = artist, model = title) but not the same! One approach might be to have a ‘products’ table with common fields such as id, price & then generic such as field3, field4, field5, etc, etc. Then one could subclass the ‘Product’ class with a Picture class that would define what field3, field4 for this class are called (field3=Artist, field4 = Title, etc). How would/could such a ‘dynamic’ approach work with rails? Most of the examples I’ve seen re: rails are relatively straightforward mappings between a ‘products’ table and a ‘Product’ class. Thanks |
|
Jan 16, 2008
eddie may
5 posts
|
Topic: Advanced Rails Recipes / Suggestions for Recipes One more thought! Thanks again. |
|
Jan 16, 2008
eddie may
5 posts
|
Topic: Advanced Rails Recipes / Suggestions for Recipes I second (or third, fourth, ...) the admin UI recipe suggestion. I recently moved some controllers + views into an admin directory & had problems getting it to work until I added the admin ‘directive’ to the form in the view like so: |
|
Jan 16, 2008
eddie may
5 posts
|
Topic: Advanced Rails Recipes / Sugestion for Upload Chapter Hi, |
5 posts
