module Rails::Generators::ResourceHelpers
def orm_class
to tell scaffold entities how to generate an specific method for the
Loads the ORM::Generators::ActiveModel class. This class is responsable
def orm_class @orm_class ||= begin # Raise an error if the class_option :orm was not defined. unless self.class.class_options[:orm] raise "You need to have :orm as class option to invoke orm_class and orm_instance" end begin "#{options[:orm].to_s.classify}::Generators::ActiveModel".constantize rescue NameError => e Rails::Generators::ActiveModel end end end