Displaying 20 results from an estimated 295 matches for "image_tag".
2006 Jun 09
5
Using link_to with an image tag & link text
Hi ,
I was trying to use link_to along with image_tag
to setup a link that would open in an external window.
But I was unable to make a link using both text & an image
So my current workaround looks like this inside a partial
where link is http://foo.com & text would be descriptive
<img src="images/arrow.gif" border="0&quo...
2009 Oct 25
3
Image_tag Positioning/Alignment
Hi:
I searched the forum before posting and could not find any help on how
to position an image using image_tag (''image_name'').
I have an image in a div, and I need to move it to the right.
How do I this? I have this code:
<div id="mainDivright"><%= image_tag (''name.gif''), :options =>
{:align=>"right" } %></div>
I even tried...
2007 Mar 24
4
image file URL generated by image_tag include some parameter
I''m using image_tag to generate img tag.
URL of image file generated by image_tag include a parameter like following.
"http:// ..... /images/filename.gif?123123123"
What''s this number parameter for? How can I remove it? I''m using rails
with built-in WEBrick server in test mode.
--~--~--...
2008 Oct 17
1
link_to + image_tag
i want to integrated link_to with image_tag
before i did link_to with image_tag like this
<%=link_to image_tag(image.filename
,:size=>''110x85''),{:action=>''thumb_crop'',:controller=>''light'',:id=>image.id},:class=>''lightview'',:id=>image.id,:rel=>...
2005 Aug 31
5
image_tag :align => 'absmiddle' ?
hi,
i''ve been through the rails apis and searched through past rails discussion,
but i haven''t managed to find a way of aligning images with the image_tag()
method.
ideally i''d like to write something like
image_tag("image.gif", :align => ''absmiddle'')
to position the image vertically in the middle of some text.
thanks
luke
2005 Dec 16
5
Question: image_tag(source, options = {})
image_tag(source, options = {})
Ok, when I want to use an image I added the following code:
<%= image_tag "dsf.jpg" options = {[align="right", style="padding-right:
10px; padding-top: 5px;"]} %>
However, this doesn''t seem to work, it doesn''t like how...
2006 Aug 04
5
image_tag + ActionMailer
Hi,
Any idea why image_tag doesn''t work within an email template? I''m trying to
generate the URL for an image and I''m getting the following error.
undefined method `request'' for #<Mailer:0x6a719e0>
I''ve been able to use link_to but no luck with image_tag.
I''ve se...
2006 Jan 17
5
file_column mangling URL
Hey,
I''ve gotten file_column to upload a file, drop it in the dynamic
directory, but I can''t display the image, the directories repeat
themselves:
My model:
class Person < ActiveRecord::Base
file_column :image_url
In my view:
<%= image_tag url_for_file_column(''person'', ''image_url'') %>
HTML generated is this:
<img alt="Male_face"
src="/dhcp/public/dhcp/public/person/image_url/3/male_face.jpg" />
There shouldn''t be two ''/dhcp/public'' there....
2007 Aug 13
1
link_to image_tag puts a box round my image
I''ve got a rather long conditional statement that either displays a
link_to(image_tag(blah)blah) or just an image_tag (i''ve edited it a bit
to show the structure):
<%= (article.score_from_user(:user_id => session[:user]) != -1)
?
(link_to image_tag("/images/down_arrow_grey.jpg", :alt => "down"),
:controller=>"article", :action =>...
2006 May 09
3
Named link to image
Hiall,
Call me stupid if you like .,) but it seems i can''t figure out how to
get a named link using a combination of link_to and image_tag. What I
need is basically a link displaying a name along with some image to
indicate status (open,working,finished). I found no combination of
link_to and image_tag that accepts a name, this seems to be solely
used for making whole images into links ... What is it that I don''t
get :)?
TIA...
2006 Nov 04
6
image_tag keeping add ???? after the url it generates
hi, all,
I have a problem with image_tag, the url it generates keeps adding ???? at
the tail.
e.g.
src="/images/gicon.jpg?1153577588??????????"
src="/images/gicon.jpg?1153577588?????????????????"
I''ve checked the source code of image_tag, and couldn''t find any solution.
The ????
is appended to the &...
2008 Jan 22
4
resizing images for display only with image_tag()
image_tag() has :size option, but only takes height/width parameters. i
want to be able to scale down the image by 50% because all my images are
different sizes so i cannot be specific as image_tag() wants me to be.
is there another RoR method i could use.
note: i don''t want to resize my original i...
2006 Jun 16
2
DISABLE auto-escaping in image_tag helper
Is there any way to disable image_tag''s automatic escaping of special html
entities in it''s :alt tag?
Example:
>From the controller:
@sale[''title''] = ''My Company Product©''
In the view:
<%= image_tag(''path/to/file.png'', :alt => @sale[''t...
2007 May 19
4
button_to_function with image?
Hi:
does button_to_function allow the use of an image? I tried it in place
of the text with "image_tag" and it doesn''t work. Maybe some form of
button_to?
Any direction you can give would be great!
Mike
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Rub...
2007 Oct 26
3
--prefix, url_for and image_tag
First time here, so I hope this isn''t a FAQ (although I did check
*the* faq).
I''m using mongrel_cluster with --prefix, and it is very slick. Thanks
for that. But I had one problem. At one point in my little app, I
have something like this:
image_tag(url_for(:action => ''picture'', :id => 1), :size =>
"160x200")
In this scenario, the modified prefix behavior causes the prefix to
be added twice. I get this output:
http://mysite/my-prefix/my-prefix/picture/1
I may be doing this wrong. It does work pro...
2008 Feb 11
1
image_tag is it just plain Broken?
I''m trying
<%= link_to image_tag("#{gallery.link_to}"), gallery_path(gallery)
unless gallery.thumbnail_id == 0%>
and get the error:
ActionView::TemplateError (undefined method `image_tag'' for #<Gallery:
0xb7083be4>) on line #23 of app/views/users/index.rhtml
This is my definition of link_to
def link_...
2009 Nov 08
1
link_to_remote with image_tag using Paperclip
...<% outer = ''a'' %>
<% inner = 1 %>
<% @photos.in_groups_of(7).each do |photorow| %>
<div id="<%= outer %>">
<% photorow.each do |photo| %>
<div id="<%= inner %>">
<% link_to_remote (image_tag(photo.mainimg.url(:thumb)),
:url => {:action => ''projects/show'', :id => ''#
{photo.project_id}''}) if photo.mainimg? %>
</div>
<% inner += 1 %>
<% end %>
</div>
<% outer = outer.succ...
2006 Jan 04
5
check if a file exists?
Hello all!
I have a list of people on a page, and some of this people have pictures
of them stored on the web server. So I have an image tag like this on my
page:
<%= image_tag "/images/people/" + person.pers_id.to_s + ".jpg" %>
But not all have a picture, so if the file for pers_id=1899 does not
exist, i would like to display a custom image for that guy.
How can I do that?
--
+S2
-------------- next part --------------
A non-text attachment was...
2013 Jun 05
1
Link_to image_tag popup
Hello All,
How can I add a popup in link_to image_tag?
I am trying as :-
<%= link_to image_tag(@user.avatar.url(:small)), ''/users/edit'',
:popup=>[''original_image'', ''height=700,width=900''] %>
It goes to the edit page. But it doesn''t opens popup.
Is this the correct way to call a...
2006 Jan 04
1
[BUG?] image_tag
i''ve got the latest ruby and rails on this box and am seeing that image_tag
will turn something like
/foo/bar.jpg
into
/foo/foo/bar.jpg
in the following situation:
/ror/foo/public
/var/www/html/foo -> /var/ror/foo/public/
image_tag("/foo/bar.jpg")
this is exactly how compute_public_path is written to work:
def compute_public_path(sou...