lib/generators/loadbehind/loadbehind_generator.rb in casey_jones-0.0.106 vs lib/generators/loadbehind/loadbehind_generator.rb in casey_jones-0.0.107

- old
+ new

@@ -1,10 +1,10 @@ class LoadbehindGenerator < Rails::Generators::NamedBase source_root File.expand_path('../templates', __FILE__) IMAGES=["error", "growl_bottom", "growl_repeat", "growl_top", "info"] - JAVASCRIPTS=["loadbehind", "jquery.growl"] + JAVASCRIPTS=["loadbehind", "jquery.growl", "jquery.ajax.enhance"] def generate_loadbehind view_dir = "app/views/#{plural_name}" JAVASCRIPTS.each do |js| @@ -28,9 +28,14 @@ template "edit.js.haml", "#{view_dir}/#{act}.js.haml" end ["destroy.js", "_errors.html"].each do |file| template "#{file}.haml", "#{view_dir}/#{file}.haml" + end + + puts "Add the following code to your layout..." + JAVASCRIPTS.each do |j| + puts " = javascript_include_tag \"#{j}.js\"" end puts "**** Remember to add loadbehind.js and jquery.growl.js to the javascript tags, or add it to your own js files. You'll also need to add handling to see that all your