Displaying 20 results from an estimated 2000 matches similar to: "Question: image_tag(source, options = {})"
2005 Nov 29
6
draggable revert problem
Hello,
I have tried implementing the shopping cart ajax example and have run into
some problems. The only differences with the shopping cart is
My list of products are generated from a partial view
The images of the products come from an http link.
However, Iam seeing a strange behavior when I drag and drop the elements to
my cart. On the first drag and drop the image successfully reverts to
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
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
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.
--~--~---------~--~----~------------~-------~--~----~
You received this message
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
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 seen a similar post to this in the list but no one has posted a
response.
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 images, i just want to be able
to display them %50 smaller. hope i make sense.
btw, great
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,
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[''title'']) %>
Output:
<img alt="My Company
2006 Apr 24
1
implementing a Slider control
i''m trying to implement a slider like
"http://wiki.script.aculo.us/scriptaculous/show/SliderDemo", but i see
that my code doesnt work.
i seem to do everything correct but then if some one could look into it
and help..
regards
muddana
The View Code:
<%= javascript_include_tag "prototype", "effects"
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 "source" parameter before it goes to the real
2006 Apr 10
6
image_tag adding request parameter
I have noticed that the image_tag helper method now appends a request
parameter to the generated src attribute. With Rails
1.0/actionpack-1.11.2 I had
<img src="/images/rss.gif" />
Now (1.1/1.12.1) I get
<img alt="Rss" border="0" src="/images/rss.gif?1142366545" />
Is there any use for that number? Where does it come from?
This is very far
2009 Nov 08
1
link_to_remote with image_tag using Paperclip
I am creating a layout of images with links.
In Photo model:
has_attached_file :mainimg, :styles => {:original =>
"465x365", :thumb => "80x70"}
In my Front controller:
def index
@photos = Photo.find(:all)
@photos = Photo.paginate :per_page => 28, :page => params[:page]
end
In index.dryml:
<% outer = ''a'' %>
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_to
unless self.thumbnail_id == 0
picture =
2007 Feb 28
6
DRY question - image_tag :alt and :title the same
Hello,
I have the following:
image_tag(''show.png'', :alt => ''show article'', :title => ''show
article'', :border => 0)
Is it possible that I donĀ“t need to have "=> ''show article''" twice in
this row? e.g. something similar to this pseudo code: (:alt, :title)
=> ''show article''.
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 popup?
How can I achieve this?
Thanks,
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(source, dir, ext)
2006 May 23
3
image_tag problem
Hiall,
I want to make an image_tag from within a controller in order to be
able to present a link (with a status image) in a view. Here is my
controller method (in file webca_controller.rb, hence WebcaController)
def untouched_status_image_tag
image_tag("open", { :alt => "Offen", :title => "Offen", :size =>
"12x12", :class =>
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 =>
2008 May 24
1
link_to_remote, image_tag, mouseover is this possible?
Hi guys,
I was wondering if you are able to have a link_to_remote, having an
image_tag and the link_to_remote has a mouseover event that updates a
div. Does the image_tag need the mouseover event? I currently have:
<%= link_to_remote(image_tag(@p_image.public_filename(:thumb)), :update
=> "big_pic", :onmouseover => {:action => :color_change, :id =>
@p_image.id})%>