public
Rubygem
Description: rails multi-model forms made easy!
Homepage: http://jamesgolick.com/attribute_fu
Clone URL: git://github.com/giraffesoft/attribute_fu.git
Automatically copy the required javascript file to 
RAILS_ROOT/public/javascripts
schof (author)
Sun Apr 20 17:14:48 -0700 2008
commit  a105310c979547a0fb614ce3d082eec971b78ec1
tree    60b0c3fa2095ad9a3e402b35f0e5f66c8b0a4405
parent  669f3faf8c2dca032ddaf72c84385101beed5b24
...
1
2
3
 
 
 
 
 
 
4
...
1
 
2
3
4
5
6
7
8
9
0
@@ -1,2 +1,7 @@
0
 ActiveRecord::Base.class_eval { include AttributeFu::Associations }
0
-ActionView::Helpers::FormBuilder.class_eval { include AttributeFu::AssociatedFormHelper }
0
\ No newline at end of file
0
+ActionView::Helpers::FormBuilder.class_eval { include AttributeFu::AssociatedFormHelper }
0
+
0
+# copy the required javascript file (if it hasn't been copied already)
0
+target_dir = "#{RAILS_ROOT}/public/javascripts"
0
+FileUtils.mkdir_p(target_dir) unless File.directory?(target_dir)
0
+FileUtils.cp(File.join(File.dirname(__FILE__), 'javascripts/jquery.template.js'), "#{RAILS_ROOT}/public/javascripts") unless File.exists?("#{RAILS_ROOT}/public/javascripts/jquery.template.js")
0
\ No newline at end of file

Comments

  • dfugere Wed May 07 07:36:47 -0700 2008

    I get a ”$ is not a function” error, I only get it with attribute_fu and not with oher features using jquery…. you know where this comes from?
    I’m using jquery 1.2.3…
    thanks