diff options
author | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:15:47 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2016-08-06 19:15:47 +0200 |
commit | 69ab3eb57e8387b0dd9d672b5e8d9185395baa03 (patch) | |
tree | a49845496e36ba7659a863e6550fcccbb9317d7d /railties/lib/rails/generators/erb | |
parent | f8477f13bfe554064bd25a57e5289b4ebaabb504 (diff) | |
download | rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.tar.gz rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.tar.bz2 rails-69ab3eb57e8387b0dd9d672b5e8d9185395baa03.zip |
applies new string literal convention in railties/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
Diffstat (limited to 'railties/lib/rails/generators/erb')
3 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/erb/controller/controller_generator.rb b/railties/lib/rails/generators/erb/controller/controller_generator.rb index 94c1b835d1..36ecfea09b 100644 --- a/railties/lib/rails/generators/erb/controller/controller_generator.rb +++ b/railties/lib/rails/generators/erb/controller/controller_generator.rb @@ -1,4 +1,4 @@ -require 'rails/generators/erb' +require "rails/generators/erb" module Erb # :nodoc: module Generators # :nodoc: diff --git a/railties/lib/rails/generators/erb/mailer/mailer_generator.rb b/railties/lib/rails/generators/erb/mailer/mailer_generator.rb index 97f3657070..1207cdad69 100644 --- a/railties/lib/rails/generators/erb/mailer/mailer_generator.rb +++ b/railties/lib/rails/generators/erb/mailer/mailer_generator.rb @@ -1,4 +1,4 @@ -require 'rails/generators/erb' +require "rails/generators/erb" module Erb # :nodoc: module Generators # :nodoc: @@ -6,12 +6,12 @@ module Erb # :nodoc: argument :actions, type: :array, default: [], banner: "method method" def copy_view_files - view_base_path = File.join("app/views", class_path, file_name + '_mailer') + view_base_path = File.join("app/views", class_path, file_name + "_mailer") empty_directory view_base_path if self.behavior == :invoke formats.each do |format| - layout_path = File.join('app/views/layouts', class_path, filename_with_extensions('mailer', format)) + layout_path = File.join("app/views/layouts", class_path, filename_with_extensions("mailer", format)) template filename_with_extensions(:layout, format), layout_path end end @@ -33,7 +33,7 @@ module Erb # :nodoc: end def file_name - @_file_name ||= super.gsub(/_mailer/i, '') + @_file_name ||= super.gsub(/_mailer/i, "") end end end diff --git a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb index c94829a0ae..154d85f381 100644 --- a/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb +++ b/railties/lib/rails/generators/erb/scaffold/scaffold_generator.rb @@ -1,5 +1,5 @@ -require 'rails/generators/erb' -require 'rails/generators/resource_helpers' +require "rails/generators/erb" +require "rails/generators/resource_helpers" module Erb # :nodoc: module Generators # :nodoc: |