Rajavel Lenin
2007-Mar-23 01:57 UTC
[Masterview-users] Bug in mv:form - not creating multipart
For a template like this: <form mv:form=":action=>''upload''" method="post" enctype="multipart/form-data"> <p><b>Upload File:</b><br /> <input type="file" name="picture_file" /></p> <p><input type="submit" name="Save" /></p> </form> It generates the .rhtml like this: <%= form_tag( { :action=>''upload'' }, :method => "post" ) %> <p><b>Upload File:</b><br /> <input name="picture_file" type="file" /></p> <p><input name="Save" type="submit" /></p> </form> By not adding :multipart=>true to the form_tag . I am a new user to Rails/Ruby/Masterview and it took me almost a day to figure out this bug. Thanks, Raj -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070322/300f9cc0/attachment.html
Jeff Barczewski
2007-Mar-23 16:07 UTC
[Masterview-users] Bug in mv:form - not creating multipart
On 3/22/07, Rajavel Lenin <rajlenin at gmail.com> wrote:> > For a template like this: > > > > <form mv:form=":action=>''upload''" method="post" > enctype="multipart/form-data"> > > <p><b>Upload File:</b><br /> > > <input type="file" name="picture_file" /></p> > > <p><input type="submit" name="Save" /></p> > > </form> > > > > It generates the .rhtml like this: > > > > <%= form_tag( { :action=>''upload'' }, :method => "post" ) %> > > <p><b>Upload File:</b><br /> > > <input name="picture_file" type="file" /></p> > > <p><input name="Save" type="submit" /></p> > > </form> > > > > By not adding :multipart=>true to the form_tag . >I am a new user to Rails/Ruby/Masterview and it took me almost a day to> figure out this bug. >Thanks for reporting this Raj. I will make the change and add some tests around it. In tracking this down and reporting it, you will save others from the same problem, so thank you for taking the time. I will post up the change as soon as it is ready. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070323/d59db869/attachment.html
Jeff Barczewski
2007-Mar-26 19:12 UTC
[Masterview-users] Bug in mv:form - not creating multipart
On 3/22/07, Rajavel Lenin <rajlenin at gmail.com> wrote:> > For a template like this: > > > > <form mv:form=":action=>''upload''" method="post" > enctype="multipart/form-data"> > > <p><b>Upload File:</b><br /> > > <input type="file" name="picture_file" /></p> > > <p><input type="submit" name="Save" /></p> > > </form> > > > > It generates the .rhtml like this: > > > > <%= form_tag( { :action=>''upload'' }, :method => "post" ) %> > > <p><b>Upload File:</b><br /> > > <input name="picture_file" type="file" /></p> > > <p><input name="Save" type="submit" /></p> > > </form> > > > > By not adding :multipart=>true to the form_tag . > > > > I am a new user to Rails/Ruby/Masterview and it took me almost a day to > figure out this bug. > > > > Thanks, > > Raj >The fix for this is checked into the subversion trunk so you can check it out with subversion now svn://rubyforge.org/var/svn/masterview/trunk/masterview I will plan to do a gem build and formal release sometime later this week. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070326/cae5da01/attachment.html