I am able to get it to work by doing the following:
Monkey Patching :: asset_tag_helper.rb
def javascript_path(source)
compute_public_path(source, 'themes', 'js')
end
def stylesheet_path(source)
compute_public_path(source, 'themes', 'css')
end
def image_path(source)
compute_public_path(source, 'themes')
end
...
And adding a helper: (this will of course change)
def current_theme_path(type)
path = @opt_default_theme + "/images/" if type == 'img'
path = @opt_default_theme + "/stylesheets/" if type == 'css'
path = @opt_default_theme + "/javascripts/" if type == 'js'
path = @opt_default_theme + "/swfs/" if type == 'swf'
return path
end
...
And finally in my layout:
<%= stylesheet_link_tag(current_theme_path('css') + @opt_theme + '.css')
%>
<%= javascript_include_tag(current_theme_path('js') + @opt_theme +
'.js') %>
Which makes all stylesheets and javascripts dynamically loaded based on
options set in the site on the fly.
However, it still doesn't solve the problem of assets..
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.