search for: compute_public_path

Displaying 18 results from an estimated 18 matches for "compute_public_path".

2007 Dec 01
3
Rails 2 problem with compute_public_path
...</tr><tr> 63: <td class="signupdescription" rowspan="2">Enter code:</td> 64: <td><%= text_field_tag :code %></td> vendor/rails/actionpack/lib/action_view/helpers/ asset_tag_helper.rb:350:in `compute_public_path'' vendor/rails/actionpack/lib/action_view/helpers/ asset_tag_helper.rb:350:in `path_to_image'' vendor/rails/actionpack/lib/action_view/helpers/ asset_tag_helper.rb:390:in `image_tag'' app/views/users/new.rhtml:61:in `_run_rhtml_47app47views47users47new46rhtml'...
2006 Jan 04
1
[BUG?] image_tag
...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) source = "/#{dir}/#{source}" unless source.first == "/" || source.include?(":") source = "#{source}.#{ext}" unless source.include?(".") source = "#{@controller.req...
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 May 23
3
image_tag problem
...ace, however this seems not enough :) When executing the call to the above method, rails complains with the following: You have a nil object when you didn''t expect it! The error occured while evaluating nil.request .../actionpack-1.12.0/lib/action_view/helpers/asset_tag_helper.rb:150:in `compute_public_path'' .../actionpack-1.12.0/lib/action_view/helpers/asset_tag_helper.rb:120:in `image_path'' .../actionpack-1.12.0/lib/action_view/helpers/asset_tag_helper.rb:135:in `image_tag'' #{RAILS_ROOT}/app/controllers/webca_controller.rb:90:in `untouched_status_image_tag'' compu...
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
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 available anymore. Any idea? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message...
2006 May 23
0
rails_asset_id, query strings, and browser caching
Hi all. Now that compute_public_path calls _rails_asset_id to append a query string containing the asset file''s modification date, all asset URLs contain query strings. [1] Which, in theory, is a fantastic thing for caching, since it forces browsers to download and not cache changed assets, allows them to cache unchanged asse...
2007 Jun 17
1
actionmailer & picture
...n="center"> Trace of template inclusion: /app/views/user_mailer/vic_announcement.rhtml RAILS_ROOT: ./script/../config/.. Application Trace | Framework Trace | Full Trace C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:207:in `compute_public_path'' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:164:in `image_path'' C:/InstantRails/ruby/lib/ruby/gems/1.8/gems/actionpack-1.13.3/lib/action_view/helpers/asset_tag_helper.rb:188:in `image_tag'' #{RAILS_ROOT}/app/vi...
2008 Feb 05
0
Asset IDs not changing in development environment?
Perhaps I''m completely missing something, but... It seems like ActionView::Helpers::AssetTagHelper#compute_public_path keeps a cache of all public paths along with the appended asset id. However, this means that applications (in this case, Facebook) that cache based on the name of the file will never pull the new file if it''s been modified. Would it make sense to either: (a) Not cache the public paths in...
2006 Aug 04
2
how to remove ID from stylesheet_link_tag?
When I use stylesheet_link_tag, the results come back with a timestamp ID, like this: <link href="/stylesheets/style.css?1154009736" media="screen" rel="Stylesheet" type="text/css" /> I don''t want the query string and ID on the end, but I can''t see how to disable this in the docs. How do I do this? thanks, jeff -- Posted via
2011 Oct 25
0
Sprocket Digest + Debug combination broken?
...rockets (2.0.3) lib/sprockets/base.rb:110:in `[]'' actionpack (3.1.1) lib/sprockets/helpers/rails_helper.rb:141:in `digest_for'' actionpack (3.1.1) lib/sprockets/helpers/rails_helper.rb:154:in `rewrite_asset_path'' actionpack (3.1.1) lib/action_view/asset_paths.rb:27:in `compute_public_path'' actionpack (3.1.1) lib/action_view/helpers/asset_tag_helpers/asset_include_tag.rb:64:in `path_to_asset'' actionpack (3.1.1) lib/action_view/helpers/asset_tag_helpers/javascript_tag_helpers.rb:19:in `asset_tag'' actionpack (3.1.1) lib/action_view/helpers/asset_tag_hel...
2011 Mar 16
1
Help overriding rescue_action_in_public in Rails 3
...3.0.5/lib/action_view/helpers/asset_tag_helper.rb:794:in `rails_asset_id'' /var/lib/gems/1.8/gems/actionpack-3.0.5/lib/action_view/helpers/asset_tag_helper.rb:817:in `rewrite_asset_path'' /var/lib/gems/1.8/gems/actionpack-3.0.5/lib/action_view/helpers/asset_tag_helper.rb:746:in `compute_public_path'' /var/lib/gems/1.8/gems/actionpack-3.0.5/lib/action_view/helpers/asset_tag_helper.rb:424:in `path_to_stylesheet'' /var/lib/gems/1.8/gems/actionpack-3.0.5/lib/action_view/helpers/asset_tag_helper.rb:875:in `ensure_stylesheet_sources!'' /var/lib/gems/1.8/gems/actionpack...
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
2009 Jul 06
0
[PATCH server] UI for accumulated uptime for VMs. (revised2)
...include_pool} diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb index 0178ad0..0c6562e 100644 --- a/src/app/helpers/application_helper.rb +++ b/src/app/helpers/application_helper.rb @@ -171,4 +171,18 @@ module ApplicationHelper def flash_path(source) compute_public_path(source, 'swfs', 'swf') end + + def number_to_duration(input_num) + input_int = input_num.to_i + hours_to_seconds = [input_int/3600 % 24, + input_int/60 % 60, + input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':...
2009 Jul 02
1
[PATCH server] UI for accumulated uptime for VMs. (revised)
...include_pool} diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb index 0178ad0..0c6562e 100644 --- a/src/app/helpers/application_helper.rb +++ b/src/app/helpers/application_helper.rb @@ -171,4 +171,18 @@ module ApplicationHelper def flash_path(source) compute_public_path(source, 'swfs', 'swf') end + + def number_to_duration(input_num) + input_int = input_num.to_i + hours_to_seconds = [input_int/3600 % 24, + input_int/60 % 60, + input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':...
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
2009 Jul 06
2
[PATCH server] UI for accumulated uptime for VMs. (revised3)
...include_pool} diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb index 0178ad0..0c6562e 100644 --- a/src/app/helpers/application_helper.rb +++ b/src/app/helpers/application_helper.rb @@ -171,4 +171,18 @@ module ApplicationHelper def flash_path(source) compute_public_path(source, 'swfs', 'swf') end + + def number_to_duration(input_num) + input_int = input_num.to_i + hours_to_seconds = [input_int/3600 % 24, + input_int/60 % 60, + input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':...
2009 Jun 29
3
[PATCH server] UI for accumulated uptime for VMs.
...include_pool} diff --git a/src/app/helpers/application_helper.rb b/src/app/helpers/application_helper.rb index 0178ad0..0c6562e 100644 --- a/src/app/helpers/application_helper.rb +++ b/src/app/helpers/application_helper.rb @@ -171,4 +171,18 @@ module ApplicationHelper def flash_path(source) compute_public_path(source, 'swfs', 'swf') end + + def number_to_duration(input_num) + input_int = input_num.to_i + hours_to_seconds = [input_int/3600 % 24, + input_int/60 % 60, + input_int % 60].map{|t| t.to_s.rjust(2,'0')}.join(':...