Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #8502: fix_flash_discard_docs.diff

File fix_flash_discard_docs.diff, 0.8 kB (added by kampers, 2 years ago)

Tiny patch to fix a mistake in docs for flash.discard

  • actionpack/lib/action_controller/flash.rb

    old new  
    9898     
    9999      # Marks the entire flash or a single flash entry to be discarded by the end of the current action 
    100100      # 
    101       #     flash.keep                 # keep entire flash available for the next action 
    102       #     flash.discard(:warning)    # discard the "warning" entry (it'll still be available for the current action) 
     101      #     flash.discard              # discard the entire flash at the end of the current action 
     102      #     flash.discard(:warning)    # discard only the "warning" entry at the end of the current action 
    103103      def discard(k = nil) 
    104104        use(k) 
    105105      end