Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `theme_image_path' for #62

Open
perumal opened this issue Aug 1, 2012 · 2 comments
Open

undefined method `theme_image_path' for #62

perumal opened this issue Aug 1, 2012 · 2 comments

Comments

@perumal
Copy link

perumal commented Aug 1, 2012

Hi,
I am getting undefined method theme_image_path' for and undefined methodcurrent_theme_image_path' for
When I used them inside .css.erb files

What could be the problem here?

@lucasefe
Copy link
Owner

lucasefe commented Aug 1, 2012

Never tried that, so I don't know if its supported.

In a html view works?

@perumal
Copy link
Author

perumal commented Aug 1, 2012

Hi lucasefe,

Yes it perfectly works inside .html.erb files

If it is not supported inside .css.erb files then please tell me how are we suppose to use the themes specific assets like images inside the theme specific css files

I tired to do this by as mentioned in the below code

#box {
padding-top: 10px;
background: url('<%= current_theme_image_path("contactus.jpg") %>');
}

The above code gives me undefined method current_theme_image_path

But If I try to use normal rails asset_path instead of current_theme_image_path then asset_path expands to /assets/contactus.jpg, which is not where my contactus.jpg is,
The actual image file is in /app/assets/themes/theme-name/images/contactus.jpg

Please help me. Is there anything wrong in my understanding.
Point me to the right way of including theme specific images in theme specific css files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants