You can clone with
# Make sure we preload the parent and children class in development
# since classes aren't pre-cached. Otherwise we get an error when
# accessing a child class before we access the parent.
%w[kase coaching_kase training_kase alpha_kase].each do |c|
# This will work without any prerequisites in any environment where classes are cached,
# but in development you will need to add an initializer that preloads the subclass files.
Kase.subclasses.each do |klass|
k = klass.name.pluralize.underscore.to_sym
resources k, :controller => 'kases'
thanks, the sti preloading helped me out in rails 4