similar to: image_path without timestamp

Displaying 20 results from an estimated 1200 matches similar to: "image_path without timestamp"

2010 Jan 15
21
Dynamic Assets - can it be done?
I''m looking for 3 areas to work as dynamic assets: image_path, javascript_path, and stylesheet_path When I say dynamic, I mean that they will be dynamic through controller/models. I have been working through approx. 12 hours of searches to satisfy my answer to this question but am not finding much luck. The closest things I''ve found enabling this are use of config for assets
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
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
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
2011 Sep 12
0
How to get the image_path in production without the asset host?
Hi guys, I would like to know how to get the image_path in production environment without the asset host (using rails 3.1). There is the image_path helper that returns the image path with md5 and (if set, and it is set) the asset host, but we have not found a way to get the path without the host. Does anyone know how to do that? Bruno Grasselli Blog: http://brunograsselli.com.br Twitter:
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:
2006 Sep 20
17
Newbie : What is the number Rails adds in images URL, etc?
If I write : <%= image_tag "rails.png" %> I get in HTML : <img alt="Rails" src="/images/rails.png?1158095722" /> What is the number at the end of the src tag ? What is it for ? Thanks :). Nicolas. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to
2006 Apr 24
2
Checkboxes - Saving a Checked record to another table
I am displaying a bunch of records from a table called "assets". Next to each record i have a checkbox. When this box is checked i want to be able to save the id of the record into another table called "flagged_assets". All I need is the ID, nothing else. Im struggling with the logic to save to another table. I know how to do it if the asset_id is already in the
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
In Rails 2.3.x, you can override render_optional_error_file like so: # ApplicationController.rb protected def render_optional_error_file(status_code) render :template => "errors/500", :status => 500, :layout => ''application'' end However, Rails 3 no longer has render_optional_error_file. Instead, you need to overriderescue_action_in_public, which I do:
2006 Apr 20
2
Image Display Question
Hello there, I have something odd happening to my image tags when displaying an image. Here''s what my ''<img src>'' tags are looking like: <img alt="2-thumb" src="/images/public/uploaded_images/2-thumb.jpg?" /> Notice the question mark at the end of the string. I have no idea where this coming from. Here are the important parts of my
2007 Jun 17
1
actionmailer & picture
Hello I''m using action mailer to create an HMTL outbound email. This email renders a partial. In that partial, a call is made to a public location to get a picture for display in the email. When this email is generate, I get the following error (note: I''m sure it has something to do with not understanding the context of actionmailer and how it functions): NoMethodError in
2007 Sep 06
4
HABTM association with own class?
If I have a class, Asset, which has and belongs to many associated Asset objects, how do I do this? has_and_belongs_to_many :associated_assets, :class => "Asset", :foreign_key => ?????, :association_foreign_key => ????? Right now, my table has a :first_asset_id and a :second_asset_id, but I don''t see how the objects themselves are supposed to distinguish one from the
2006 Jan 09
1
Question about image storage and relative paths
I''m writing a website with a feature that hosts images that people upload. Right now, relative paths works within on my Windows box. So specifically, I''m able to call File.open on "public/images/somefile.jpg" and Rails/WEBrick understands that the path is relative to the home directory of the project. This means that "public/images/somefile.jpg" ends up
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 Feb 18
3
Numbers on stylesheet_link_tag and image_tag
Can anyone explain to me exactly what are those numbers that rails appends to stylesheets and images when using stylesheet_link_tag or image_tag? At first I thought it would be so the browser wouldn''t cache the stylesheets, but that doesn''t make much sense for images, plus it seems that the numbers are unique, maybe based on the session. Any idea? Thanks
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
2008 Jun 11
1
Resourse route in namespace with prefix error
Ok so I have this route map.namespace :trades do |trades| trades.resources :buys, :path_prefix => ''/trades/:contract_id'' end I want the contract_id variable to filter a list of buys then I try to open this route http://localhost:3000/trades/1/buys I get a strange error: ActionController::RoutingError in Trades/buys#index Showing trades/buys/index.html.erb where line
2007 Jun 26
4
Can I stub a method on a belongs_to association:
describe Asset, " when destroyed" do fixtures :assets, :videos, :sites, :publish_settings before(:each) do @asset = assets(:test_asset) @mock_hook = mock("hook") @asset.video.stub!(:hook).and_return @mock_hook # error occurs here end it "should call the delete hook" do @mock_hook.should_receive(:update).with("test_video",
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
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,