diff options
author | Jamis Buck <jamis@37signals.com> | 2006-10-15 03:11:08 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-10-15 03:11:08 +0000 |
commit | 39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60 (patch) | |
tree | 82c3f3486f3d472447a3540df96de6926e6568e6 /actionpack/lib/action_controller | |
parent | 2049313e3c3f0fd907cef469fc8b0d708768ae7a (diff) | |
download | rails-39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60.tar.gz rails-39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60.tar.bz2 rails-39963b4b9df7f6c3e7d29c91dfdd1e8279f51e60.zip |
remove an obsolete #dup call. avoid double negatives, to make the code easier to understand and explain
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5304 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 687f8dc2bc..79ec617cc8 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -317,7 +317,7 @@ module ActionController # Write and compile a +generate+ method for this Route. def write_generation # Build the main body of the generation - body = "not_expired = true\n#{generation_extraction}\n#{generation_structure}" + body = "expired = false\n#{generation_extraction}\n#{generation_structure}" # If we have conditions that must be tested first, nest the body inside an if body = "if #{generation_requirements}\n#{body}\nend" if generation_requirements @@ -671,7 +671,7 @@ module ActionController end end def expiry_statement - "not_expired, hash = false, options if not_expired && expire_on[:#{key}]" + "expired, hash = true, options if !expired && expire_on[:#{key}]" end def extraction_code @@ -1190,7 +1190,6 @@ module ActionController def generate(options, recall = {}, method=:generate) named_route_name = options.delete(:use_route) if named_route_name - options = options.dup named_route = named_routes[named_route_name] options = named_route.parameter_shell.merge(options) end |