1. 07 2月, 2016 1 次提交
  2. 07 10月, 2015 1 次提交
    • J
      Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compat · 565094a8
      Jeremy Daer 提交于
      Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries
      that support multiple Rails versions would've had to feature-detect
      whether to use `Mime::Type[:FOO]` or `Mime::FOO`.
      
      `Mime[:foo]` has been around for ages to look up registered MIME types
      by symbol / extension, though, so libraries and plugins can safely
      switch to that without breaking backward- or forward-compatibility.
      
      Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup
      by type or extension, so it's not available as `Mime[:all]`. We use it
      internally as a wildcard for `respond_to` negotiation. If you use this
      internal constant, continue to reference it with `Mime::ALL`.
      
      Ref. efc6dd55
      565094a8
  3. 26 9月, 2015 1 次提交
  4. 22 9月, 2015 2 次提交
    • A
      introduce an `All` mime type · f8ba48c1
      Aaron Patterson 提交于
      This class gives us the `all?` predicate method that returns true
      without hitting method missing
      f8ba48c1
    • A
      deprecate accessing mime types via constants · efc6dd55
      Aaron Patterson 提交于
      We don't want to manage a list of constants on `Mime::`.  Managing
      constants is strange because it will break method caches, not to mention
      looking up by a constant could cause troubles.  For example suppose
      there is a top level constant `HTML`, but nobody registers the HTML mime
      type and someone accesses `Mime::HTML`.  Instead of getting an error
      about how the mime type doesn't exist, instead you'll get the top level
      constant.
      
      So, instead of directly accessing the constants, change this:
      
        Mime::HTML
      
      To this:
      
        Mime::Type[:HTML]
      efc6dd55
  5. 28 5月, 2015 1 次提交
  6. 06 12月, 2013 1 次提交
  7. 30 1月, 2012 1 次提交
  8. 28 6月, 2011 2 次提交
  9. 30 7月, 2009 1 次提交
  10. 21 5月, 2009 1 次提交
  11. 28 1月, 2009 2 次提交
  12. 03 7月, 2008 1 次提交
  13. 06 5月, 2008 1 次提交
  14. 16 5月, 2007 1 次提交
  15. 27 3月, 2007 1 次提交
  16. 18 2月, 2007 1 次提交
  17. 13 1月, 2007 1 次提交
  18. 07 12月, 2006 2 次提交
  19. 03 12月, 2006 1 次提交