attribute_fu and jQuery shake hands 4

Posted by james
on Wednesday, April 02

This blog has been quiet of late, because I'm working on a couple of exciting, but still top-secret projects. Anyway, I recently moved one of those projects over to jQuery, because of its speed, syntax, and general awesomeness. Tonight, when I went to create a multi-model form with attribute_fu, I was stopped dead in my tracks by its heavy dependency on prototype. A few minutes of hacking later, a_f and jQuery are playing rather nicely together.

Get it from the jquery branch of a_f's git repo. If you aren't using git yet, this might be just the excuse you need to check it out! Or, download a tarball from github. After you install the plugin, you'll have to copy its one javascript dependency (jQuery templates) from the javascripts directory over in to your public/javascripts and require it in your layout.

Comments

Leave a response

  1. BernardoApril 11, 2008 @ 02:37 PM

    Hi James,

    First of all, thanks for the nice posts and plugins you have been posting!

    Is attributefu working with edge rails (rev9221 and up)? I've tried rev71 at your svn repo, and it seems to be breaking every the whole app, whenever there is a call to a method in an association proxy (even when :hasattributes is not defined), such as: @posts.comments.create!(params[:comment])

    Thanks a lot, Bernardo

  2. jamesApril 13, 2008 @ 12:22 AM

    On http://github.com/giraffesoft/attribute_fu/tree/jquery

    why is the git url the same as the main branch?

    git://github.com/giraffesoft/attribute_fu.git

    I was expecting something in the above URL to reflect the fact it was jquery and a different branch to the others... else im not actually cloning the branch?

  3. James GolickApril 13, 2008 @ 07:51 AM

    @bernardo - I'm really not sure about a_f's status on edge rails. I haven't worked on that at all yet. Before rails 2.1, I'll probably clear up any issues, but I'm not sure how soon before then.

    @james - with git, you clone a whole repository, not a specific branch. after you git clone, then you need to do: git checkout origin/jquery

  4. Mike LarkinJuly 20, 2008 @ 01:37 PM

    Now that 2.1 is out...any hopes of updating the plugin? I'm getting stack overflow errors, nil Array references...the works!

    Thanks!

Comment






Clicky Web Analytics