diff options
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/actions.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/railties/lib/rails/generators/actions.rb b/railties/lib/rails/generators/actions.rb index abcbe7068d..a239874df0 100644 --- a/railties/lib/rails/generators/actions.rb +++ b/railties/lib/rails/generators/actions.rb @@ -258,13 +258,12 @@ module Rails # Surround string with single quotes if there is no quotes. # Otherwise fall back to double quotes def quote(str) - if str.class == String && str.scan("'").size > 0 + if str.include?("'") str.inspect else "'#{str}'" end end - end end end |