Correctly override image_path in sprockets rails_helper #3138

Merged
merged 2 commits into from Sep 26, 2011

Conversation

Projects
None yet
2 participants
Contributor

christos commented Sep 26, 2011

This commit 0cb84f1 broke the image_path helper when the assets pipeline is enabled.

Instead of /assets it would prepend /images when image_path() was used. This is due to the way image_path and path_to_image are aliased to each other in asset_tag_helper

This patch fixes the image_path helper.

I am perplexed as to why in sprockets_helper_text what is tested is asset_path, an undocumented method, and not image_path which is the publish API (along with video_path, audio_path and all its siblings)

Shouldn't the test be refactored somehow?

spastorino added a commit that referenced this pull request Sep 26, 2011

Merge pull request #3138 from christos/correct_image_path_with_pipeline
Correctly override image_path in sprockets rails_helper

@spastorino spastorino merged commit e97b6f2 into rails:master Sep 26, 2011

spastorino added a commit that referenced this pull request Sep 26, 2011

Merge pull request #3138 from christos/correct_image_path_with_pipeline
Correctly override image_path in sprockets rails_helper

@christos christos deleted the christos:correct_image_path_with_pipeline branch Apr 22, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment