This here is useful stuff to read:

http://guides.rubyonrails.org/asset_pipeline.html

If not configured differently, the images that you have stored under
app/assets/images/arrow_close.png end up with an url of "/assets/
arrow_close.png" - it's always a good idea to try this out in the
browser first and to check the console to see how the pipeline
processes the resources - the output here is usually quite verbose.

hope this helps,
stefan


On 9 Feb., 05:59, Soichi Ishida <[email protected]> wrote:
> Rails 3.1.3
>
> This should be a basic question but it does not work for me, so I need
> some help.
>
> I would like to insert an image with jQuery after loading the page is
> done.
>
> More specifically,
>
>     $('#combine').click(function () {
>   $('#tempimage').html('<img src="/images/arrow_close.png">');
>     });
>
> this way.  It does not work.  I understand that the problem is the PATH.
> The image is saved in "app/assets/images".
>
>     $('#combine').click(function () {
>   $('#tempimage').html('<%= image_tag ("/images/arrow_close.png") %>');
>     });
>
> this does not work either.
>
> How can I do it?
>
> Thanks in advance.
>
> soichi
>
> --
> Posted viahttp://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.

Reply via email to