This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rails/actionpack/lib/action_view/cache_helper.rb | |
private | |
# TODO: Create an object that has caching read/write on it | |
def fragment_for(name = {}, options = nil, &block) #:nodoc: | |
if fragment = controller.find_fragment(name, options) | |
fragment.read | |
else | |
# VIEW TODO: Make #capture usable outside of ERB | |
# This dance is needed because Builder can't use capture |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails 3.1.1: | |
http://dl.dropbox.com/u/12274059/rails_issue311 | |
rails 4.0.0beta: | |
http://dl.dropbox.com/u/12274059/rails_issue400beta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# IP v4 and v6 (with compression) validation regexp | |
# http://regexlib.com/REDetails.aspx?regexp_id=1000 | |
# http://regexlib.com/REDetails.aspx?regexp_id=2685 | |
VALID_IP = %r{ | |
(^(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})(\.(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[0-9]{1,2})){3}$) | # ip v4 | |
(^( | |
(([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}) | # ip v6 not abbreviated | |
(([0-9A-Fa-f]{1,4}:){6}:[0-9A-Fa-f]{1,4}) | # ip v6 with double colon in the end | |
(([0-9A-Fa-f]{1,4}:){5}:([0-9A-Fa-f]{1,4}:)?[0-9A-Fa-f]{1,4}) | # - ip addresses v6 |
NewerOlder