1. 19 2月, 2014 1 次提交
  2. 15 2月, 2014 1 次提交
  3. 13 2月, 2014 1 次提交
    • I
      Added tests to render helper that expect `render partial: @foo` to · 5b793a8a
      Iain Beeston 提交于
      automatically call @foo.to_partial_path
      
      Calling `render @foo` allows local variables but not options to be
      passed to the partial renderer. The correct way to render an object AND
      pass options to the partial renderer is to pass the object in the
      `:partial` parameter. However, there were previously no tests for this
      behaviour (in `render_helper_test.rb` at least).
      5b793a8a
  4. 03 2月, 2014 1 次提交
  5. 27 1月, 2014 1 次提交
  6. 14 1月, 2014 1 次提交
  7. 13 1月, 2014 1 次提交
  8. 10 1月, 2014 2 次提交
    • J
      Avoid scanning multiple render calls as a single match. · ccbba3ff
      João Britto 提交于
      Each chunk of text coming after `render` is now handled individually as a possible list of arguments.
      ccbba3ff
    • J
      Improve ERB dependency detection. · c2afa055
      João Britto 提交于
      The current implementation can't handle some special cases of oddly-formatted Ruby. Now we are able to detect them:
      
      * Multi-line arguments on the `render` call
      * Strings containing quotes, e.g. `"something's wrong"`
      * Multiple kinds of identifiers - instance variables, class variables and globals
      * Method chains as arguments for the `render` call
      
      Also, this fix reduces the rate of "false positives" which showed up when we had calls/access to identifiers containing `render`, like `surrender` and `rendering`.
      c2afa055
  9. 06 1月, 2014 1 次提交
    • G
      Switched to use `display:none` in extra_tags_for_form method. · 7a085dac
      Gaelian Ditchburn 提交于
      The use of `display:inline` with the content_tag call in the
      extra_tags_for_form method potentially causes display issues with some
      browsers, namely Internet Explorer. IE's behaviour of not collapsing
      the line height on divs with ostensibly no content means that the
      automatically added div containing the hidden authenticity_token, utf8
      and _method form input tags may interfere with other visible form
      elements in certain circumstances. The use of `display:none` rather
      than `display:inline` fixes this problem.
      
      Fixes #6403
      7a085dac
  10. 25 12月, 2013 1 次提交
  11. 24 12月, 2013 1 次提交
  12. 19 12月, 2013 1 次提交
  13. 18 12月, 2013 2 次提交
  14. 17 12月, 2013 1 次提交
  15. 12 12月, 2013 2 次提交
  16. 07 12月, 2013 1 次提交
  17. 06 12月, 2013 1 次提交
  18. 05 12月, 2013 5 次提交
  19. 04 12月, 2013 2 次提交
    • M
    • Ł
      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
  20. 03 12月, 2013 2 次提交
  21. 02 12月, 2013 1 次提交
  22. 27 11月, 2013 2 次提交
  23. 16 11月, 2013 1 次提交
  24. 09 11月, 2013 1 次提交
  25. 05 11月, 2013 1 次提交
  26. 01 11月, 2013 1 次提交
  27. 30 10月, 2013 1 次提交
  28. 17 10月, 2013 1 次提交
  29. 15 10月, 2013 1 次提交
  30. 10 10月, 2013 1 次提交