Displaying 20 results from an estimated 2000 matches similar to: "[BUG?] image_tag"
2008 Dec 10
12
image_tag cannot show picture
Dear all
I am new to rails.
In view, I place the following code, but cannot show the picture in the
webpage
<%= image_tag("green.JPG") %>
However, I can access the picture in this url
http://localhost:3000/images/green.JPG
The HTML source code generated
<img alt="Green" src="/images/green.JPG.?1228211220" />
I cannot identify the problem. Please help
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 =>
2009 Jan 06
2
Change the default folder for image_tag, javascript_include_
Hi,
I don''t want my default folder to be mysite.com/images/logo.png, but
instead mysite.com/common/images/logo.png
How can I change that? Same applies to stylesheets and javascripts.
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails:
2008 Oct 28
7
How to override one method of AssetTagHelper
I created a file ./lib/action_view/helpers/asset_tag_helper.rb
and put in it only the method I want to override. like this
module ActionView
module Helpers #:nodoc:
module AssetTagHelper
def image_path(source)
compute_public_path(source, ''images'')
end
end
end
end
But as soon I try this all the others methods from the overriden module
are not
2006 Jan 14
2
file_column, ActionMailer, and tests
Hi,
Say I have a model Event that has a file_column called ''pdf''.
I want to send out emails that contain the URL for the pdf file that''s
associated with the Event. I also want to test the emails, so I''d
need to be able to get at the URL for the pdf inside my unit tests.
I don''t see how I can use url_for_file_column in this situation.
Doing <%=
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,
2007 Feb 08
2
cannot set ENV['RAILS_RELATIVE_URL_ROOT']
i am on lighttpd now, and i cannot set
cannot set enviroment variable:
i added this line to enviroment.rb, but it doesn not work!!
ENV[''RAILS_RELATIVE_URL_ROOT''] = ''something''
links on my page are ok, but all links to images, stylesheets etc are
broken, (because relative_url_root returns ''''), what else can I do?
thanks. f.
--
Posted via
2006 Jul 26
5
Mongrel + mod_proxy URL issues
We have a Centos server with a number of virtual hosts, and my rails app
runs under one of those virtual hosts using mongrel_rails. The app lives
in /home/mydomain/railsapp where /home/mydomain/railsapp/public is the
rails root.
It runs under mongrel on port 8008, so to get to it users invoke the url
http://www.mydomain.com:8008/ - all is fine to this point.
Now I have some users whose
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
2008 Jan 31
2
Facebooker and file_column
Facebooker URL Rewriter stuff overloads ActionController::AbstractRequest.relative_url_root, causing a conflict with the plugin file_column and possibly other utilities. file_column constructs image URLs using the server host and relative_url_root
This is not related to the sandbox patch I added to the rewriter. Facebooker overloaded relative_url_root before I touched it.
I''ve
2007 Dec 01
3
Rails 2 problem with compute_public_path
I''m trying to migrate to Rails 2, but keep getting these errors all
over the place:
ActionView::TemplateError: wrong number of arguments (2 for 3)
On line #61 of users/new.rhtml
58: <% if @captcha_error -%><div class="fieldWithErrors"><
% end -%>
59: <table class="signup"><tr>
60: <td
2009 Jul 20
1
CSS issue when using SubUri and Passenger
I am testing another application in local
in my environment.rb I wrote
config.action_controller.relative_url_root = "/elnino"
config.action_controller.asset_host = "http://opticoaching.local"
I defined correctly the vhost (I have already odne it for another app
which is running well...)
<VirtualHost *:80>
ServerName opticoaching.local
DocumentRoot
2009 Apr 06
2
URL issue localhost/mongrel vs remote-server/apache
Hi all
I have a small issue I ma trying to solve (at least to understand..)
I am testing an app on my remote_server (w Apache/Passenger) in a
sub_URI, without any problem (I tested also the same app, locally w
Apache too)
in my environment.rb , I have initialized
config.action_controller.relative_url_root = "/my_subURI"
config.action_controller.asset_host =
2007 Oct 11
2
relative_url_root and javascript_include_tag
Hi. In my environment.rb, I have:
ActionController::AbstractRequest.relative_url_root = "/foobar"
In my layout, I have:
<%= javascript_include_tag :defaults %>
Question 1:
I am getting an error:
ActionController::RoutingError (no route found to match
"/javascripts/prototype.js" with {:method=>:get}):
When I remove the relative_url_root, everything works great.
2008 Jan 09
1
relative_url_root and problems with CSS url()
I''m using relative_url_root to allow my app to be run from a sub-
domain. Things work fine except with images that are referenced in my
CSS code.
For example,
background-image: url(/images/bg_image.jpg);
does not take into account the value in relative_url_root.
Consequently, my background image (and other images similarly
referenced in my stylesheet) are not loadable.
Anyone know a
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
2006 Mar 20
1
FileColumn question
Can someone please help me with this.
I have an Images table :-
create table images (
id integer unsigned not null auto_increment primary key,
image varchar(200) not null default ''''
)ENGINE=InnoDB default CHARSET=latin1;
And a car table :-
create table cars (
id integer unsigned not null auto_increment primary key,
user_id integer unsigned not null,
title varchar(100) not
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