Sure:
class MyModel < ActiveRecord::Base def do_something_dangerous eval self.a_text_field_containing_ruby_code end end