A few corrections #
Posted Sunday 21st January 2007 02:09 GMT
Your finder there is completely terrible. It's vulnerable to a SQL injection attack. Instead, you want Catalog.find_all_by_section(params[:section]); that is cleaner and requires no SQL. Furthermore, why isn't this in the context of a full Rails app? Why do you manually establish the ActiveRecord connection in the model? Finally, why are you embedding your HTML generation in the controller instead of putting it where it belongs, in views?


