Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fragment caching regression from 03d01ec #2150

Closed
wants to merge 5 commits into from

Commits on Jul 19, 2011

  1. Alias << as append= for ActiveSupport::SafeBuffer to fix "undefined m…

    …ethod `append='" error with fragment cache helper on cache miss introduced with 03d01ec.
    
    Since 03d01ec fragment_for sets the output_buffer to a SafeBuffer. ERB expects append= to be defined on the output_buffer.
    This means subsequent ERB tags would cause an "undefined method `append='" error.
    kommen committed Jul 19, 2011
    Copy the full SHA
    9f7e775 View commit details
    Browse the repository at this point in the history
  2. Instead of adding append= to SafeBuffer, use the same class for the n…

    …ew output_buffer which was used for the old one.
    kommen committed Jul 19, 2011
    Copy the full SHA
    55beb17 View commit details
    Browse the repository at this point in the history
  3. Added tests for the output_buffer returned by CacheHelper

    The output_buffer returned by CacheHelper should be html_safe if the original buffer is html_safe.
    Lauri Hahne authored and kommen committed Jul 19, 2011
    Copy the full SHA
    b2a2035 View commit details
    Browse the repository at this point in the history
  4. made sure that the possible new output_buffer created by CacheHelper …

    …is of the same type as the original
    Lauri Hahne authored and kommen committed Jul 19, 2011
    Copy the full SHA
    bd6206b View commit details
    Browse the repository at this point in the history
  5. Remove tests to check if the old output_buffer is still html_safe. It…

    … is replaced with an html_safe one anyway, if the old one was safe.
    kommen committed Jul 19, 2011
    Copy the full SHA
    ccdbf49 View commit details
    Browse the repository at this point in the history