search for: assettaghelp

Displaying 20 results from an estimated 22 matches for "assettaghelp".

Did you mean: assettaghelper
2009 Apr 09
4
uninitialized constant ActionView::Helpers::AssetTagHelper
...fresh install of os x 10.5, and upgraded to rails 2.3.2. i installed the mysql pkg for os x, and created the databases i needed for the project i was working on before the upgrade. However when i run rake db:migrate to run my migrations i get this error uninitialized constant ActionView::Helpers::AssetTagHelper I''ve found some stuff about the AssetTagHelper, but i haven''t found anything related to this error when running the rake db:migrate. Does anyone have any idea what could be going on, or link me in the right direction? Thanks, John --~--~---------~--~----~------------~-------~...
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/. --~--~---------~--~--...
2006 Feb 12
9
CSS in Views
How can I link to a CSS file in one of my view files? -- Posted via http://www.ruby-forum.com/.
2006 Jun 08
3
Back again; errors in depot app
Sorry, but this is a big one - after adding the Ajax portion of the Agile Web Development tutorial my page displays: Application error Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html It started when I added - page[:current_item].visual_effect :highlight, :startcolor => "#88ff88" , :endcolor =>
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
2006 Jul 25
1
Battle of Namings: stylesheet_link_tag vs link_to_javascript
Link helper namings counterintuitive in an environment where convention over configuration prevails: <%= link_to_javascript ''myscript'' %> <%= stylesheet_link_tag ''mystyle'' %> A simple def in ActionView::Helpers::AssetTagHelper would fix things in a nice, backward-compatible way, such that: <%= link_to_javascript ''myscript'' %> <%= link_to_stylesheet ''mystyle'' %> In the meantime I can do a def in my own app''s helpers.
2008 Oct 31
2
Stubbing #javascript_include_tag in a helper spec
...it ''should include the "foo" JS file'' do # expectation here helper.foobar end end end I''ve tried replacing "# expectation here" with the following, but none of them result in the desired behaviour: ActionView ::Helpers::AssetTagHelper.should_receive :javascript_include_tag @controller.should_receive :javascript_include_tag @controller.instance_eval { @template }.should_receive :javascript_include_tag Thanks! Nick
2006 Mar 13
1
rendering templates outside defaultl views location
...the following situation (pseudo code): IF file /path/to/some/tpldit exists render that ELSE render file from default tpl dir END Should I override some built-in Rails methods for this or is there an easier (yet clean and DRY) way of doing this? I''ve done something similar for the assetTagHelper related functions using a tiny plugin that overrides some built-in Rails methods, but I''d like to avoid that if I can. TIA, Jeroen
2006 Jan 28
2
javascripts
Trying to use auto_complete_for which works fine on my home system. I see that when I use <%= javascript_include_tag "defaults" %> that when used, the webrick reports GET /javascripts/prototype.js GET /javascripts/dragdrop.js GET /javascripts/effects.js GET /javascripts/controls.js but on the system that I am trying to develop on and doing similarly, the webrick only reports
2010 Oct 15
2
include ActionView::Helpers in Rails 3?
How do you do the equivalent of: module MyLibrary include ActionView::Helpers::AssetTagHelper end ...in Rails 3? I''m trying to upgrade my app from 2.3.9 to 3.0.1 and I have some stuff in /lib that needs to include these helpers from ActionView. It works fine in 2.3.x, but in 3.x it''s giving me the error: undefined local variable or method `config'' One of the...
2011 Sep 02
1
can't compile assets on prod due to asset_host config && SSL requirement
...request| if request.ssl? "#{request.protocol}#{request.host_with_port}" else "#{request.protocol}assets#{(source.length % 4) + 1}.example.com" end } ...which is more or less straight from the docs: http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html When I go to assets:precompile, I get this: $ RAILS_ENV=production bundle exec rake assets:precompile rake aborted! This asset host cannot be computed without a request in scope. Remove the second argument to your asset_host Proc if you do not need the request. ....except that I can'&...
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
2010 Jun 04
9
Compress css files with Rails
Hi, I work on a website with many css files. To improve the performance of the site I would to merge all my css file into one on the production site. I know I could do this using plugins, but I heard it is possible natively within rails. Does someone know what it is? Greg -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups
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 =>
2006 Jan 12
6
link_to_image - Remove Border
Hi All, I am new to both Ruby and Rails, so please be patient with me. I am currently working on a view for a controller and I have used the following excerpt: <td><%= link_to_image "b_edit", :action => ''edit'', :id => part_prefix %></td> The image is being displayed and the link is working. However, the formatting of image rendered
2005 Jun 12
1
Referring to static resources
What is the "right" way to refer to static resources (i.e. files in ./public)? The problem with the obvious way (hard-coded root, such as href="/stylesheets/myapp.css") is that it doesn''t survive ProxyPass and some other such things. Alex
2007 May 24
0
asset tag helpers
Is it possible to add another asset tag helper (ActionView::Helpers::AssetTagHelper ) ?? coz i''m using the ActionController::Base.asset_host = "http:// assets.example.com" for my static files.. and I want my app to get video files from that host too.. but the thing is only images, javascripts and stylesheets have the asset tag helpers with them.. what if i wan...
2007 May 24
0
asset tag helper
Is it possible to add another asset tag helper (ActionView::Helpers::AssetTagHelper ) ?? coz i''m using the ActionController::Base.asset_host = "http:// assets.example.com" for my static files.. and I want my app to get video/flash files from that host too.. but the thing is only images, javascripts and stylesheets have the asset tag helpers with them..what if...
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 cach...
2006 Aug 06
0
Best practice: installing plugin assets in rake task or install.rb?
...eferrably existing (different) files are overwritten only after asking and removed only when unchanged. Also, I saw that several plugin READMEs tell the plugin user to include JavaScript files in their views or layouts. This isn''t necessary as it can be automated: ActionView::Helpers::AssetTagHelper::register_javascript_include_default(''cool_plugin'') After this, <%= javascript_include_tag :default %> will additionally write out an include element for public/javascripts/cool_plugin.js Michael -- Michael Schuerig mailto:michael@schuerig.de http://www.schuerig.de/mi...