Open danielma opened 6 years ago
Hi @danielma first of all I'm sorry for responding so late.
Do you think that some of the built-in projectile-rails-find-.*-resource
commands would improve from this change? If not I'm afraid I would not merge it. It's a smart solution but it would just make the code a bit more complex without any benefit.
@Silex what do you think?
@asok 🤔 honestly, no I don't think any of the built-ins would be improved by this change. I feel like my use case is common but not standard.
This is definitely a projectile-rails
power user feature. I have a bunch of extra projectile-rails-find-*
commands that I've defined for myself.
If it doesn't seem like it will benefit the project and you decide not to merge, no hard feelings. Thanks for taking a look
Allow regular expressions with more than one match group, and concatenate them to create the final string.
This is useful for me for finding nested resources with similar paths, and building short selectors based only on the unique elements.
The best example is finding JS components inside the
app/javascripts
directory.The application I work on has two main interfaces, one for admins, and one for regular consumers. So we have components both inside the
app/javascripts/admin/components
andapp/javascripts/consumer/components
directories.With this change, I can do something like
and this will generate a list like