class LoadbehindTemplatesGenerator < Rails::Generators::Base source_root File.expand_path('../../../../app/views/loadbehind', __FILE__) FILES = ["_edit.js.haml", "_errors.html.haml", "_view.js.haml","_show_box.html.haml"] def generate_loadbehind_templates view_dir = "app/views/loadbehind" FILES.each do |f| copy_file f, "#{view_dir}/#{f}" end end end