aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/segments.rb
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-07-28 13:38:20 -0500
committerJoshua Peek <josh@joshpeek.com>2008-07-28 13:38:20 -0500
commite0513e33c4da60255e7c1aa71babcc9414f26858 (patch)
treeefe4d45c74db48b4107a650341d13d10f2451317 /actionpack/lib/action_controller/routing/segments.rb
parent6e754551254a8cc64e034163f5d0dc155b450388 (diff)
downloadrails-e0513e33c4da60255e7c1aa71babcc9414f26858.tar.gz
rails-e0513e33c4da60255e7c1aa71babcc9414f26858.tar.bz2
rails-e0513e33c4da60255e7c1aa71babcc9414f26858.zip
Routing whitespace cleanup
Diffstat (limited to 'actionpack/lib/action_controller/routing/segments.rb')
-rw-r--r--actionpack/lib/action_controller/routing/segments.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing/segments.rb b/actionpack/lib/action_controller/routing/segments.rb
index f0ad066bad..18e76b6b82 100644
--- a/actionpack/lib/action_controller/routing/segments.rb
+++ b/actionpack/lib/action_controller/routing/segments.rb
@@ -130,6 +130,7 @@ module ActionController
def extract_value
"#{local_name} = hash[:#{key}] && hash[:#{key}].to_param #{"|| #{default.inspect}" if default}"
end
+
def value_check
if default # Then we know it won't be nil
"#{value_regexp.inspect} =~ #{local_name}" if regexp
@@ -141,6 +142,7 @@ module ActionController
"#{local_name} #{"&& #{value_regexp.inspect} =~ #{local_name}" if regexp}"
end
end
+
def expiry_statement
"expired, hash = true, options if !expired && expire_on[:#{key}]"
end
@@ -175,7 +177,7 @@ module ActionController
end
def regexp_chunk
- if regexp
+ if regexp
if regexp_has_modifiers?
"(#{regexp.to_s})"
else
@@ -214,7 +216,6 @@ module ActionController
def regexp_has_modifiers?
regexp.options & (Regexp::IGNORECASE | Regexp::EXTENDED) != 0
end
-
end
class ControllerSegment < DynamicSegment #:nodoc: