Skip to content

Commit

Permalink
Rename template files to their singular form.
Browse files Browse the repository at this point in the history
Improved test of javascript framework with File.exists?()
  • Loading branch information
Peter Giacomo Lombardo committed Feb 12, 2011
1 parent 4ced816 commit 013a558
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/generators/nested_form/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@ def self.source_root
File.dirname(__FILE__) + "/templates"
end


def copy_jquery_file
stat = File.stat('public/javascripts/prototype.js')
if stat.file?
if File.exists?('public/javascripts/prototype.js')
copy_file 'prototype_nested_form.js', 'public/javascripts/nested_form.js'
else
copy_file 'jquery_nested_form.js', 'public/javascripts/nested_form.js'
Expand Down

0 comments on commit 013a558

Please sign in to comment.