1. 20 6月, 2017 1 次提交
  2. 20 1月, 2017 1 次提交
  3. 29 10月, 2016 1 次提交
  4. 27 10月, 2016 1 次提交
    • X
      let Regexp#match? be globally available · 56832e79
      Xavier Noria 提交于
      Regexp#match? should be considered to be part of the Ruby core library. We are
      emulating it for < 2.4, but not having to require the extension is part of the
      illusion of the emulation.
      56832e79
  5. 16 8月, 2016 1 次提交
  6. 07 8月, 2016 2 次提交
  7. 25 7月, 2016 1 次提交
  8. 23 1月, 2016 1 次提交
  9. 23 9月, 2014 1 次提交
  10. 14 3月, 2014 1 次提交
  11. 04 12月, 2013 1 次提交
    • Ł
      Action Pack Variants · 2d3a6a0c
      Łukasz Strzałkowski 提交于
      By default, variants in the templates will be picked up if a variant is set
      and there's a match. The format will be:
      
        app/views/projects/show.html.erb
        app/views/projects/show.html+tablet.erb
        app/views/projects/show.html+phone.erb
      
      If request.variant = :tablet is set, we'll automatically be rendering the
      html+tablet template.
      
      In the controller, we can also tailer to the variants with this syntax:
      
        class ProjectsController < ActionController::Base
          def show
            respond_to do |format|
              format.html do |html|
                @stars = @project.stars
      
                html.tablet { @notifications = @project.notifications }
                html.phone  { @chat_heads    = @project.chat_heads }
              end
      
              format.js
              format.atom
            end
          end
        end
      
      The variant itself is nil by default, but can be set in before filters, like
      so:
      
        class ApplicationController < ActionController::Base
          before_action do
            if request.user_agent =~ /iPad/
              request.variant = :tablet
            end
          end
        end
      
      This is modeled loosely on custom mime types, but it's specifically not
      intended to be used together. If you're going to make a custom mime type,
      you don't need a variant. Variants are for variations on a single mime
      types.
      2d3a6a0c
  12. 20 6月, 2013 1 次提交
  13. 05 6月, 2011 1 次提交
  14. 20 3月, 2011 1 次提交
  15. 27 12月, 2010 1 次提交
  16. 10 10月, 2010 1 次提交
    • J
      Resolvers now consider timestamps. · 38d78f99
      José Valim 提交于
      Before this patch, every request in development caused the template
      to be compiled, regardless if it was updated in the filesystem or not.
      This patch now checks the timestamp and only compiles it again if
      any change was done.
      
      While this probably won't show any difference for current setups,
      but it will be useful for asset template handlers (like SASS), as
      compiling their templates is slower than ERb, Haml, etc.
      38d78f99
  17. 08 10月, 2010 1 次提交
  18. 07 10月, 2010 1 次提交
  19. 27 9月, 2010 1 次提交
  20. 14 8月, 2010 2 次提交
  21. 03 5月, 2010 2 次提交
  22. 20 3月, 2010 1 次提交
  23. 18 3月, 2010 1 次提交
  24. 16 3月, 2010 1 次提交
  25. 12 3月, 2010 1 次提交
  26. 11 3月, 2010 1 次提交
  27. 09 3月, 2010 1 次提交
  28. 07 3月, 2010 1 次提交
  29. 04 9月, 2009 2 次提交
  30. 02 9月, 2009 1 次提交
  31. 16 8月, 2009 1 次提交
    • Y
      Got tests to pass with some more changes. · 1310231c
      Yehuda Katz 提交于
        * request.formats is much simpler now
          * For XHRs or Accept headers with a single item, we use the Accept header
          * For other requests, we use params[:format] or fallback to HTML
          * This is primarily to work around the fact that browsers provide completely
            broken Accept headers, so we have to whitelist the few cases we can
            specifically isolate and treat other requests as coming from the browser
          * For APIs, we can support single-item Accept headers, which disambiguates
            from the browsers
        * Requests to an action that only has an XML template from the browser will
          no longer find the template. This worked previously because most browsers
          provide a catch-all */*, but this was mostly accidental behavior. If you
          want to serve XML, either use the :xml format in links, or explicitly
          specify the XML template: render "template.xml".
      1310231c
  32. 24 6月, 2009 1 次提交
  33. 18 6月, 2009 2 次提交
  34. 21 5月, 2009 1 次提交
  35. 02 5月, 2009 1 次提交