This project is archived and is in readonly mode.

#2264 ✓stale
kakutani

TestUploadedFile.new handles String and Pathname

Reported by kakutani | March 17th, 2009 @ 06:33 AM | in 2.3.10

Because Rails.root returns Pathname instance since Rails 2.3.

Here's patch:

Comments and changes to this ticket

  • MOROHASHI Kyosuke

    MOROHASHI Kyosuke March 17th, 2009 @ 08:25 AM

    +1

    I's better to extract base filename not by regexp but File.basename(), I think.

  • CancelProfileIsBroken

    CancelProfileIsBroken August 8th, 2009 @ 01:15 AM

    • Tag changed from 2.3.2, 2.3.x, action_pack, file_field, patch, test_process to 2.3.2, 2.3.x, action_pack, bugmash, file_field, patch, test_process
  • Josh Nichols

    Josh Nichols August 9th, 2009 @ 06:38 PM

    • Tag changed from 2.3.2, 2.3.x, action_pack, bugmash, file_field, patch, test_process to 2.3.2, 2.3.x, action_pack, bugmash, file_field, patch, test_process, verified

    +1, because it reads a lot better, and involves a lot less crazy regexping.

    Verified the patch works as expected.

  • Edd Morgan

    Edd Morgan August 9th, 2009 @ 09:15 PM

    +1 Tests pass on 2-3-stable, patch works.

  • Rizwan Reza

    Rizwan Reza August 9th, 2009 @ 09:19 PM

    verified

    +1 Patch applies. All tests pass.

  • Rizwan Reza

    Rizwan Reza August 9th, 2009 @ 09:26 PM

    not reproducible in master

    +1 This is only applicable to 2-3-stable. This is probably a bug.

    By adding test without code, the output in 2-3-stable is:

    
    <"mona_lisa.jpg"> expected but was <#<Pathname:>>
    
  • Rizwan Reza

    Rizwan Reza January 20th, 2010 @ 11:16 AM

    • State changed from “new” to “open”
    • Tag changed from 2.3.2, 2.3.x, action_pack, bugmash, file_field, patch, test_process, verified to 2.3.2, 2.3.x, action_pack, file_field, patch, test_process, verified
    • Milestone changed from 2.x to 2.3.6

    It's still applying cleanly.

  • Marius Nuennerich

    Marius Nuennerich May 3rd, 2010 @ 07:21 PM

    Content type is image/png but filename ends in .jpg. Bug?

  • Rizwan Reza

    Rizwan Reza May 16th, 2010 @ 02:41 AM

    • Tag changed from 2.3.2, 2.3.x, action_pack, file_field, patch, test_process, verified to 2.3.2, 2.3.x, action_pack, bugmash, file_field, patch, test_process, verified
  • Jeremy Kemper

    Jeremy Kemper May 23rd, 2010 @ 05:54 PM

    • Milestone changed from 2.3.6 to 2.3.7
  • Jeremy Kemper

    Jeremy Kemper May 24th, 2010 @ 09:40 AM

    • Milestone changed from 2.3.7 to 2.3.8
  • Jeremy Kemper

    Jeremy Kemper May 25th, 2010 @ 11:45 PM

    • Milestone changed from 2.3.8 to 2.3.9
  • Jeremy Kemper

    Jeremy Kemper August 30th, 2010 @ 02:28 AM

    • Milestone changed from 2.3.9 to 2.3.10
    • Importance changed from “” to “”
  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:33 PM

    • Tag changed from 2.3.2, 2.3.x, action_pack, bugmash, file_field, patch, test_process, verified to 232, 23x, action_pack, bugmash, file_field, patch, test_process, verified

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:33 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Attachments

Pages