diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-25 20:59:18 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-07-25 20:59:18 -0300 |
commit | 93e6dd12372d0b825069c440ddd48e62e0100cbb (patch) | |
tree | 7d882238534289604c10890eef1e8443ae18d850 /railties/guides | |
parent | 6aa12535881e00f156cf7ddacaba123ed181e015 (diff) | |
download | rails-93e6dd12372d0b825069c440ddd48e62e0100cbb.tar.gz rails-93e6dd12372d0b825069c440ddd48e62e0100cbb.tar.bz2 rails-93e6dd12372d0b825069c440ddd48e62e0100cbb.zip |
Changed returning with tap on guides
Diffstat (limited to 'railties/guides')
-rw-r--r-- | railties/guides/source/plugins.textile | 2 | ||||
-rw-r--r-- | railties/guides/source/security.textile | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/plugins.textile b/railties/guides/source/plugins.textile index e853ba79e9..82f2276153 100644 --- a/railties/guides/source/plugins.textile +++ b/railties/guides/source/plugins.textile @@ -1274,7 +1274,7 @@ class YaffleMigrationGenerator < Rails::Generator::NamedBase end def yaffle_local_assigns - returning(assigns = {}) do + {}.tap do |assigns| assigns[:migration_action] = "add" assigns[:class_name] = "add_yaffle_fields_to_#{custom_file_name}" assigns[:table_name] = custom_file_name diff --git a/railties/guides/source/security.textile b/railties/guides/source/security.textile index 60108d5ab3..8ce0001080 100644 --- a/railties/guides/source/security.textile +++ b/railties/guides/source/security.textile @@ -286,7 +286,7 @@ When filtering user input file names, _(highlight)don't try to remove malicious <ruby> def sanitize_filename(filename) - returning filename.strip do |name| + filename.strip.tap do |name| # NOTE: File.basename doesn't work right with Windows paths on Unix # get only the filename, not the whole path name.sub! /\A.*(\\|\/)/, '' |