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. 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
  8. 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
  9. 24 12月, 2013 1 次提交
  10. 18 12月, 2013 1 次提交
  11. 12 12月, 2013 2 次提交
  12. 07 12月, 2013 1 次提交
  13. 06 12月, 2013 1 次提交
  14. 05 12月, 2013 4 次提交
  15. 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
  16. 03 12月, 2013 2 次提交
  17. 02 12月, 2013 1 次提交
  18. 27 11月, 2013 2 次提交
  19. 16 11月, 2013 1 次提交
  20. 09 11月, 2013 1 次提交
  21. 01 11月, 2013 1 次提交
  22. 30 10月, 2013 1 次提交
  23. 17 10月, 2013 1 次提交
  24. 15 10月, 2013 1 次提交
  25. 25 9月, 2013 1 次提交
  26. 23 9月, 2013 3 次提交
  27. 19 9月, 2013 2 次提交
    • D
      Bust the template digest cache key when details are changed · 77e79ecd
      Daniel Schierbeck 提交于
      Since the lookup details will influence which template is resolved, they
      need to be included in the cache key -- otherwise two different
      templates may erroneously share the same digest value.
      77e79ecd
    • A
      Add params option for button_to · e6e0579d
      Andy Waite 提交于
      The parameters are rendered as hidden form fields within the generated
      form. This is useful for when a record has multiple buttons associated
      with it, each of which target the same controller method, but which
      need to submit different attributes.
      e6e0579d
  28. 18 9月, 2013 1 次提交
    • S
      There's no need to do this · 949c4291
      Santiago Pastorino 提交于
      AS does the following inside Time.find_zone! ...
      `ActiveSupport::TimeZone[time_zone] || TZInfo::Timezone.get(time_zone)`
      and given that the test is stubbing AS::TZ[] we don't need the removed
      code.
      949c4291
  29. 13 9月, 2013 1 次提交