method

gsub_file

Importance_0
v2.0.3 - Show latest stable - 0 notes - Class: Rails::Generator::Commands::Base
gsub_file(relative_destination, regexp, *args, &block) protected

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File railties/lib/rails_generator/commands.rb, line 87
          def gsub_file(relative_destination, regexp, *args, &block)
            path = destination_path(relative_destination)
            content = File.read(path).gsub(regexp, *args, &block)
            File.open(path, 'wb') { |file| file.write(content) }
          end
Register or log in to add new notes.