Cheers, I have a form with an input inside that I want to be able to submit by itself (I want to let the user create new tags with this input and use them to tag the whole content that is posted by the rest of the form). I have this layout: <form ...> <input type="text" id="new_tag" /> <%= link_to_remote "Schlüsselwort hinzufügen",:url => { :action => "ajax_add_tag", .... }" %> </form> The ":with => "''tag='' + $F(''new_tag'')" stuff like in observe_field does not work and I cannot specify the tag like ":tag = XXX" because its value is unknown at render time. The user enters it so I have to use JavaScript like with observe_field. The problem is that link_to_remote does not accept JavaScript. How do I solve this? Thanks, Jonathan -- Jonathan Weiss http://blog.innerewut.de
i know this is probably really simple, but how do i apply a patch to rails? i''m especially interested in using the upload_progress patch http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff thanks in advance! steve
Stephen Karsch wrote:> i know this is probably really simple, but how do i apply a patch to rails? > i''m especially interested in using the upload_progress patch > http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diffStephen, You download the plain text or original format of the patch: http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff?format=txt http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff?format=raw Then look at the first line of the file, in this case Index: actionpack/test/controller/multipart_progress_test.rb So you need to cd into the directory that properly lists that location. In this case, since multipart_progress_test.rb is a new file, you can''t ls it from that location, but you can find the directory path ''actionpack/test/controller''. So you''d probably want to cd into my-rails-project/vendor/rails/. Then you do patch -p0 < /where/you/saved/your/patch.txt Regards, Blair -- Blair Zajac, Ph.D. <blair-szbw9MROnEZWk0Htik3J/w@public.gmane.org> Subversion and Orca training and consulting http://www.orcaware.com/svn/
On Sun, Dec 11, 2005 at 10:25:18AM -0800, Blair Zajac wrote:> Stephen Karsch wrote: > >i know this is probably really simple, but how do i apply a patch to rails? > >i''m especially interested in using the upload_progress patch > >http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff > You download the plain text or original format of the patch: > > http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff?format=txt > http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff?format=raw > > Then look at the first line of the file, in this case > > Index: actionpack/test/controller/multipart_progress_test.rbI''ve got a little function in my .zshrc (from the toolkit of Mr. DHH) to cut out a step: function pap { curl -s $1 | patch -p0 } Then, given the above actionpack patch it''s just: % cd /path/to/rails % pap ''http://dev.rubyonrails.org/attachment/ticket/1026/upload_progress_1356-2.diff?format=txt'' marcel -- Marcel Molina Jr. <marcel-WRrfy3IlpWYdnm+yROfE0A@public.gmane.org>