require 'rails/generators' module DynamicMenu class InstallGenerator < Rails::Generators::Base def generate_install dir = "app/menus" Dir.mkdir(dir) unless File.exists?(dir) end end end