tag:blogger.com,1999:blog-7033945969374781589.post4507379286088730593..comments2023-11-05T03:29:19.777-08:00Comments on nerbie69 off rails: Theme Support plugin update for Rails 2.2- Part 2.nerbie69http://www.blogger.com/profile/00829233647136943532noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-7033945969374781589.post-81672499001254072312008-12-30T07:13:00.000-08:002008-12-30T07:13:00.000-08:00hi kadoudal. I was able to fix this error in my v...hi kadoudal. I was able to fix this error in my version of theme_support, however i needed to basically 'lift' the whole ActionView::Helpers::AssetTagHelpers file and put it into my plugin. However, since you are using compute_public_path in a js call, maybe you will have luck with the public_path method that ActionView::Helpers::AssetTagHelpers gives you access to in the AssetTag class. here is an example : <BR/>def public_path<BR/> segments = [theme_name, directory, @source]<BR/> compute_public_path(File.join('/themes', *segments))<BR/> end<BR/><BR/>It turns out the problem for me was that compute_public_path was added to a Class within ActionView::Helpers::AssetTagHelpers that made it hard to access without copying the whole file over to my plugin and tweaking it as needed.<BR/>I know it's not the silver bullet you wanted, but maybe it will help?nerbie69https://www.blogger.com/profile/00829233647136943532noreply@blogger.comtag:blogger.com,1999:blog-7033945969374781589.post-3025020382282867022008-12-30T06:05:00.000-08:002008-12-30T06:05:00.000-08:00In 2.0.2 compute_public_path was also private....g...In 2.0.2 compute_public_path was also private....<BR/><BR/>got the same problem when upgrading to 2.2... in a wiki formatting textile helper ..<BR/><BR/> link_to( I18n.t(:label_help), compute_public_path('wiki_syntax', 'help', 'html'), :onclick => "window.open(\"#{ compute_public_path('wiki_syntax', 'help', 'html') }\", \"\", \"resizable=yes, location=no, width=300, height=640, menubar=no, status=no, scrollbars=yes\"); return false;")<BR/><BR/>let us know if yu find a trick ... will do the same...Anonymousnoreply@blogger.com