From: Peter Marks Date: 2008-04-05T01:37:53+09:00 Subject: Re: Using a string as executable code Thanks for the input guys. instance_eval is exactly what I was looking for. I realize storing code in a database is kind of a funny idea, but I don't see a better alternative for the problem I face. I need to generate an array of object customized strings, specially selected from a pool of about 500 string functions. The only alternative I see is defining about 300 extra frivolous string methods in my model and selecting among those based on database values. That doesn't seem any less smelly. What, specifically, concerns your the most about storing code in a database? The risk of it becoming stale as your app changes? Performance issues? Thanks Again, Peter -- Posted via http://www.ruby-forum.com/.