1. 15 12月, 2015 1 次提交
    • S
      Remove ActionView::Helpers::CacheHelper#fragment_cache_key · 1a404abc
      Sam Stephenson 提交于
      Introduced in e56c6354, `CacheHelper#fragment_cache_key` is a duplicate of `ActionController::Caching::Fragments#fragment_cache_key`.
      
      We now require the view to provide this method on its own (as with `view_cache_dependencies`); `ActionController::Caching::Fragments` exports its version as a `helper_method`.
      1a404abc
  2. 13 11月, 2015 1 次提交
  3. 03 11月, 2015 1 次提交
  4. 26 9月, 2015 1 次提交
  5. 29 6月, 2015 1 次提交
    • R
      Fix cache issue when different partials use the same collection · da167457
      Roque Pinel 提交于
      Adds the `virtual_path` option to `cache_fragment_name` so it can
      be provided when needed.
      
      That allows `cache_collection_render` to get the appropriate cache
      key with the digest generated based on the template and prevent
      collision with other templates that cache the same collection.
      da167457
  6. 14 5月, 2015 1 次提交
    • H
      Do not put partial name to local_assigns when rendering without an object · bef9484c
      Henrik Nygren 提交于
      When one rendered a partial template without specifying an object
      or a collection (e.g. <%= render partial: 'partial_name' %>), Rails
      would make an object called :partial_name available in local_assigns.
      I don't think this was the intended behavior, since no local variable
      called 'partial_name' gets defined in the view.
      bef9484c
  7. 21 2月, 2015 3 次提交
    • K
      Collections automatically cache and fetch partials. · 11644fd0
      Kasper Timm Hansen 提交于
      Collections can take advantage of `multi_read` if they render one template
      and their partials begin with a cache call.
      
      The cache call must correspond to either what the collections elements are
      rendered as, or match the inferred name of the partial.
      
      So with a notifications/_notification.html.erb template like:
      
      ```ruby
      <% cache notification %>
        <%# ... %>
      <% end %>
      ```
      
      A collection would be able to use `multi_read` if rendered like:
      
      ```ruby
      <%= render @notifications %>
      <%= render partial: 'notifications/notification', collection: @notifications, as: :notification %>
      ```
      11644fd0
    • F
      Error message testing fix · b1d26350
      Franky W 提交于
      The testing of error messages have been implemented wrongly a few times.
      This is an attempt to fix it.
      
      For example, some of these test should have failed with the new code.
      The reason they are not failling with the new string is the fact they
      were not being tested beforehand.
      b1d26350
    • K
      Merge multi_fetch_fragments. · e56c6354
      Kasper Timm Hansen 提交于
      Makes caching a collection of template partials faster using `read_multi`
      on the Rails cache store.
      
      Some caching implementations have optimized `read_multi` so we don't have
      to check in the cache store for every template.
      e56c6354
  8. 06 2月, 2015 1 次提交
  9. 03 2月, 2015 1 次提交
  10. 30 12月, 2014 1 次提交
  11. 19 12月, 2014 1 次提交
  12. 29 11月, 2014 1 次提交
  13. 19 7月, 2014 1 次提交
  14. 17 7月, 2014 1 次提交
    • J
      Added PartialIteration class used when rendering collections · 1f5b3604
      Joel Junström 提交于
      The iteration object is available as the local variable
      "template_name_iteration" when rendering partials with collections.
      
      It gives access to the +size+ of the collection beeing iterated over,
      the current +index+ and two convinicence methods +first?+ and +last?+
      
      "template_name_counter" variable is kept but is deprecated.
      
      [Joel Junström + Lucas Uyezu]
      1f5b3604
  15. 12 7月, 2014 1 次提交
  16. 14 6月, 2014 1 次提交
  17. 12 6月, 2014 1 次提交
  18. 19 2月, 2014 1 次提交
  19. 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
  20. 02 12月, 2013 1 次提交
  21. 24 11月, 2013 1 次提交
  22. 01 11月, 2013 1 次提交
  23. 15 7月, 2013 1 次提交
  24. 21 6月, 2013 1 次提交
  25. 20 6月, 2013 1 次提交
  26. 21 4月, 2013 1 次提交
  27. 04 4月, 2013 1 次提交
  28. 08 1月, 2013 1 次提交
    • C
      Do not generate local vars for partials without object or collection · c67005f2
      Carlos Antonio da Silva 提交于
      Previously rendering a partial without giving :object or :collection
      would generate a local variable with the partial name by default.
      
      This was noticed due to warnings in Ruby 2.0 of not used variables,
      which turned out to be the generation of not used variables inside
      partials that do not contain objects related to them.
      c67005f2
  29. 02 12月, 2012 1 次提交
  30. 27 10月, 2012 1 次提交
  31. 17 9月, 2012 2 次提交
  32. 11 9月, 2012 1 次提交
  33. 14 8月, 2012 1 次提交
  34. 03 8月, 2012 1 次提交
  35. 18 7月, 2012 1 次提交
  36. 18 5月, 2012 1 次提交
  37. 05 5月, 2012 1 次提交