Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(projectile-rails-choices): use all matches
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` and `app/javascripts/consumer/components` directories. With this change, I can do something like ```elisp (projectile-rails-find-resource "component: " '(("app/javascripts/" "/javascripts/\\(.+/\\)components/\\(.+\\).js$"))) ``` and this will generate a list like ``` admin/money_input consumer/money_input shared/error_container ```
- Loading branch information