How to change default path for images to look for
By default, rails is looking for images to "public/images" folder.
But it is not suiteable for me, since i have all the multimedia stuff in "public/data/:model/:id" folders.
How do i force rails to look into this folder.
I don't need obligatory such a pattern, that i mentioned above. The only thing, i need, is just to change "public/images" path to "public/data", so, the rails should look to "data" folder, instead of "images".
I don't need to use "开发者_运维百科paperclip" plugin, because my models holding the pure HTML content (with clean and simple structure, that will not change in the future), that has "img" tags.
How can it be done ?
You you mean the image_tag
helper is looking by default there? That's only the case if you only specify a relative path. Putting the full path in gets what you want I believe.
<%= image_tag '/data/model/1'
would generate
<img src="/data/model/1.png">
精彩评论