Thomas Fuchs a écrit :
> I'd suggest that you implement your own helper for this, that
> generates the code.
> Look at the implementation of draggable_element and extend/adjust to
> your
> needs.
Hmm, yes, that would do it, especially if you need this multiple times.
Something like this in your app/helpers/application_helper.rb should do
the trick:
def draggable_elements(*args)
options = {}
options = args.pop if args.last.is_a?(Hash)
js = ''
args.each do |a|
js << draggable_element_js(a, options) << "\n"
end
javascript_tag(js.chop!)
end
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs
-~----------~----~----~----~------~----~------~--~---