Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed returning with tap on guides

  • Loading branch information...
commit fd589db8633ef3eda398365f2a6d551edfed547e 1 parent 37d82f2
Santiago Pastorino spastorino authored fxn committed
2  railties/guides/source/plugins.textile
View
@@ -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
2  railties/guides/source/security.textile
View
@@ -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.*(\\|\/)/, ''
Please sign in to comment.
Something went wrong with that request. Please try again.