Figured this out for nbow... You can do something like...
model_class = create_arec @table do
validates_presence_of :summary_reviews
end
model = Object.const_set(@table.classify, model_class)
def create_arec(table_name, &block)
klass = Class.new(ActiveRecord::Base){self.table_name = table_name}
klass.class_eval &block
klass
end
def create_acntl(controller_name, super_class = ApplicationController, &block)
klass = Class.new(super_class)
klass.class_eval &block
klass
end
def compose_controller(klass, &block)
klass.class_eval &block
end
THis will create the objects... still have not got it doing exactly what I want to.
More later perhaps!
hope this helps someone.
--mark