Make all pin*
methods behave conventionally the same
#72
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please read #66 and #67 to know the background behind why this PR is raised.
This PR replaces
pin_all_from
withpin_under
which has the same thinking behind it as thepin
method. Moreover, thepin_under
method utilizes theRails.application.config.assets.paths
to figure out the files needed to be pinned, so that one does not have to specify the folder name from the Rails' root.There's one thing which is remaining, that is when you specify just the folder name to
pin_all_from
:it will pin all the files inside the
app/assets/javascripts
folder automatically, which I'm not sure how to do so withpin_under
; so any and all suggestions are welcome. My idea was to have another method calledpin_all
which will only take one parameter, e.g."app/assets/javascript"
(from the Rails' root), and will do the job of pinning everything under that folder.Also, feel free to suggest any changes and I'll be more than happy to do so.