Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

TestUploadedFile.new handles String and Pathname

#2264

Because Rails.root returns Pathname instance since Rails 2.3.

Here's patch:

Reported by kakutani · March 17th, 2009 @ 06:33 AM

State: stale
Milestone: 2.3.10
Assigned to: nobody
Importance: none

Activity

  1. MOROHASHI Kyosuke
    MOROHASHI Kyosuke

    +1

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

    March 17th, 2009 @ 08:25 AM

  2. CancelProfileIsBroken
    CancelProfileIsBroken
    • 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

    August 8th, 2009 @ 01:15 AM

  3. Josh Nichols
    Josh Nichols
    • 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.

    August 9th, 2009 @ 06:38 PM

  4. Edd Morgan
    Edd Morgan

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

    August 9th, 2009 @ 09:15 PM

  5. Rizwan Reza
    Rizwan Reza

    verified

    +1 Patch applies. All tests pass.

    August 9th, 2009 @ 09:19 PM

  6. Rizwan Reza
    Rizwan Reza

    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:>>
    

    August 9th, 2009 @ 09:26 PM

  7. Rizwan Reza
    Rizwan Reza
    • 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.

    January 20th, 2010 @ 11:16 AM

  8. Marius Nuennerich
    Marius Nuennerich

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

    May 3rd, 2010 @ 07:21 PM

  9. Rizwan Reza
    Rizwan Reza
    • 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

    May 16th, 2010 @ 02:41 AM

  10. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.6 to 2.3.7

    May 23rd, 2010 @ 05:54 PM

  11. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.7 to 2.3.8

    May 24th, 2010 @ 09:40 AM

  12. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.8 to 2.3.9

    May 25th, 2010 @ 11:45 PM

  13. Jeremy Kemper
    Jeremy Kemper
    • Milestone changed from 2.3.9 to 2.3.10
    • Importance changed from to

    August 30th, 2010 @ 02:28 AM

  14. Santiago Pastorino
    Santiago Pastorino
    • 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.

    February 2nd, 2011 @ 04:33 PM

  15. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 2nd, 2011 @ 04:33 PM