You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @stefanoverna, I checked out Padrino 0.11.4 and searched after the asset_timestamp method and found it under padrino-framework/padrino-helpers/lib/padrino-helpers/asset_tag_helpers.rb. Now it looks like:
### Returns the timestamp mtime for an asset.## @example# asset_timestamp("some/path/to/file.png") => "?154543678"#defasset_timestamp(file_path)returnniliffile_path =~ /\?/ || (self.class.respond_to?(:asset_stamp) && !self.class.asset_stamp)public_path=self.class.public_folderifself.class.respond_to?(:public_folder)public_path ||= Padrino.root("public")ifPadrino.respond_to?(:root)public_file_path=File.join(public_path,file_path)ifpublic_pathstamp=File.mtime(public_file_path).to_iifpublic_file_path && File.exist?(public_file_path)stamp ||= Time.now.to_i"?#{stamp}"end
Some little things are different now but I'm not quite if you can now debug JavaScript in the way you want, can you test this please?
Hey, thanks for this little awesome gem.
The only problem is that:
is producing a different URL every time I reload the page based on the timestamp, ie.
This is due to the
asset_timestamp
method in Padrino:Since sprockets does not produce a final JS, there is no mtime, and
Time.now
is used.How do you handle this? :)
The text was updated successfully, but these errors were encountered: