igorkasyanchuk / rails_db

Rails Database Viewer and SQL Query Runner
https://www.railsjazz.com/
MIT License
1.46k stars 111 forks source link

Fix double lookup asset_path #88

Closed z4ppy closed 6 years ago

igorkasyanchuk commented 6 years ago

quick question, you made this fix because of some issue? I just remember someone added them because it was not working well in production mode I guess.

igorkasyanchuk commented 6 years ago

here https://github.com/igorkasyanchuk/rails_db/commit/6220f13d47df19b252ea9a8722dcf2328c0e4018 @tyrauber why you made this fix?

z4ppy commented 6 years ago

Hi, i had some issue :

Asset names passed to helpers should not include the "/assets/" prefix. Instead of "/assets/rails_db/logo.png", use "rails_db/logo.png"

sprocket-rails 2.3.3 actionview 4.2.10 rails 4.2.10 mounted like this : mount RailsDb::Engine => '/db', :as => 'rails_db'

igorkasyanchuk commented 6 years ago

what is the issue? you can see here https://github.com/igorkasyanchuk/rails_db/commit/6220f13d47df19b252ea9a8722dcf2328c0e4018 that it was the same way, but for others, it doesn't work.

z4ppy commented 6 years ago

http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html

image_tag don't need to include asset path i mean.

tyrauber commented 6 years ago

@igorkasyanchuk, I am not entirely sure. I just opened up and edited /test/dummy and both work. Obviously, when I made that pull request, images weren't rendering, but perhaps that was a local application / environment issue. Unfortunately, I don't recall the exact circumstances. Feel free to revert. Sorry for the unnecessary commit.