Run Ruby Code Stored in DB

Hi,

I have a module which needs configurable rule. This piece of code,
something as small as, "current_user.chapter_id", etc has been stored
in the DB. I fetch this code into the helper class and then need to
run it to generate an ID. How do i do it???

But of course its taking it as a string.

Is there something like REFLECTION?

Is there something like REFLECTION?

Well you can use eval. However more often than not there is a better
way (that won't let someone setup the rule `rm -rf` )

Fred

eval works! :slight_smile:
Thanks you