There's a rails helper that'll do it for you... asset_path... so ...

=image_tag asset_path('simon.png'), :size => '153x110'


On Sep 30, 2013, at 7:20 AM, Ero s wrote:

> Hello guys!
>  So this is my first post here, and i was started to use haml/sass with ROR 
> recently
> i'm trying to put images on my view using this haml code:
> 
> [code]
> .mydivclass
>   = image_tag 'simon.png', alt: 'My Image', size: '153x110'
> [/code]
> 
> so in my chrome dev tools i see:
> 
> <img alt="My Image" height="110" src="http://my-ip:3000/images/simon.png"; 
> width="153">
> 
> but don't load the image,
> 
> the path of images on my project is, 
> 
> project/project_name/app/assets/images
> 
> someone can help me about this?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Haml" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/haml.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/haml.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to