[Feedback Needed] Remove redundant method in Rails::Generators::Base

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[Feedback Needed] Remove redundant method in Rails::Generators::Base

Ricardo Díaz Yachachín
Hey there!

I've been working on this patch and I would like to read your opinions about it.

Basically, the `Rails::Generators::Base#indent` method can be replaced with the new `Rails::Generators::Actions#optimize_indentation` introduced in 8bf0967. I think that it would be beneficial to avoid duplication and use a single version. However, the newly introduced method is slightly less efficient as the benchmark I did shows and that's why I'm unsure to create a new PR for this.

I'm attaching the patch with the change and here's also the commit in GitHub https://github.com/ricardotk002/rails/commit/a08d0de7c671814c2d7735c88d0961bccd7fa8b7

Any feedback will be appreciated, thanks!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/rubyonrails-core.
For more options, visit https://groups.google.com/d/optout.

0001-Remove-redundant-Rails-Generators-Base-indent-method.patch (7K) Download Attachment