This project is archived and is in readonly mode.
Rails Upgrade plugin loses found results after a comment
Reported by Peer Allan | October 17th, 2010 @ 08:01 PM
In our app we used the rails_upgrade plugin to find what we needed to fix. We found that the rails:upgrade:check rake task was missing many of our named_scopes. It turns out that the grep command is being scrubbed by gsub and that if the first line in the results was a comment, then all subsequent lines were lost. For example,
Grep results:
/path/to/app/models/article.rb: # named_scope :active /path/to/app/models/article.rb: named_scope :inactive /path/to/app/models/post.rb: named_scope :by_author
You would expect the upgrade to skip the first line and report the second and third line, but at present it returns no results. The attached patch fixes this.
Comments and changes to this ticket
-
Ryan Bigg October 21st, 2010 @ 03:38 AM
- Tag cleared.
- Importance changed from to Low
Automatic cleanup of spam.
-
Vijay Dev February 20th, 2011 @ 04:51 PM
This is not a Rails issue. You can submit pull requests in rails_upgrade on GitHub.
Can be closed.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>