image_path should return blank string if empty source is passed
I think the correct implementation is right as you pointed in #7559 (https://github.com/rails/rails/blob/v3.2.8/actionpack/test/template/asset_tag_helper_test.rb#L169)
It is returning "/assets/" because you are using the assets pipeline.
@guilleiguaran could you review this one and see if it make sense?
@rafaelfranca shouldn't it return img src="" even with asset pipeline? There were discussions in #3080 #5020
As far as I'm concerned, this comment nails it. That would render invalid HTML, and adding a conditional to handle a case where you're trying to render something incorrectly sounds like a bad idea to me. 👎.
But then again, since we accepted #5020, apparently this ship has already sailed.
Yeah, I know it's invalid HTML and you can still use tag :img, src: '' (i.e. to play nice with holder.js). But I expected to see this behavior in rails 3, as #5020 was merged.
tag :img, src: ''
Any decision on this? Is it need tests?
No, the implementation is right. If returns src="" when with not assets pipeline and src="assets/" with the assets pipeline.
Also I don't think we should change this since this can add incompatible changes in a stable branch.
Closing. Thank you for the pull request