Displaying 15 results from an estimated 15 matches for "asset_paths".
Did you mean:
asset_path
2012 Oct 18
3
#asset_url helper method
Just putting this out there before I make a pull request.
Is there any interest in an asset_url method as a view helper?
It would work by using the config.action_controller.asset_host if it exists
and prepending this to the results of asset_path.
I have found this necessary when writing html emails and needing a full url
path for assets. Since my CDN in the asset_host mirrors my assets in my
2011 Jul 22
0
Asset Pipeline and Sprockets
Ok I would love to work out how to use the new Raisl 3.1 Asset
Pipeline with SCSS variables, mixins etc and being able to use the
asset_path tag.
What I have so far is this. Im my application.css.scss I have the
following.
*= require_self
*= require layout
*= require home
This works fine with using the asset_path helper and variable within
layout ie,
// layout.css.scss.erb
2010 Jun 11
2
AR after_initialize quandry
I have a case where I am abstracting the creation of models. After a
fair bit of indirection, I eventually get around to making a .new call.
I need to be able to pass params to that .new call.
I know I can''t use def initialize() in an AR model (rather frustrating).
So, I have found some references to after_initialize, but that doesn''t
work either.
I see several threads on
2006 May 30
0
Modules in the ''lib'' directory
Hi, I have a module in the /myApp/lib directory to help manage image
files. It is coincidentally called ''image_manager''.
There is a function in there called asset_path, which is used to
determine the path of the images that is defined as follows:
def asset_path
"#{RAILS_ROOT}/#{ASSET_DIR}/#{foo.id}"
end
I am including the image manager module in the model
2012 Sep 28
0
Overriding class_attribute writers and order of super/extend C.M./included block eval in ActiveSupport::Concern
...ncluded_block) if
instance_variable_defined?("@_included_block")
And there are classes like this that only benefit from the dependency
handling and included block class_eval part of Concern that maybe could
benefit from that being split up somehow?:
actionpack/lib/abstract_controller/asset_paths.rb:
module AbstractController
module AssetPaths #:nodoc:
extend ActiveSupport::Concern
included do
config_accessor :asset_host, :asset_path, :assets_dir,
:javascripts_dir,
:stylesheets_dir, :default_asset_host_protocol, :relative_url_root
end
end
end
Sorry if this...
2008 Jun 02
0
stylesheet_link_tag, javascript_include_tag, caching problems
...e files already exist ... even if
I''ve changed my list of js/css files to something completely
different, it won''t rewrite the file if it already exists ...
Do we really need the unless in this block? (asset_tag_helper.rb)
def write_asset_file_contents(joined_asset_path, asset_paths)
unless file_exist?(joined_asset_path)
FileUtils.mkdir_p(File.dirname(joined_asset_path))
File.open(joined_asset_path, "w+") { |cache|
cache.write(join_asset_file_contents(asset_paths)) }
end
end
--~--~---------~--~----~------------~----...
2011 Sep 23
1
Rails 3.1.0 how to pass the full url of an image asset ?
I need to reference the full url of an image stored in the assets,
this url is passed to fancy box to open it
I build the image path in helper and it get the path
"ceramics/big/c0d0.jpg" "ceramics/big/c0d2.jpg", ...
but I need to get the full url to these image
asset_path("ceramiques/big/c0d0.jpg") => "/assets/ceramiques/big/
c0d0.jpg"
but there
2012 Jan 03
1
Rails 3.1 assets pipeline issue in production
I am running a jwplayer with an open ads server plugin .. it''s running
fine in development, ads are served , but not in production on the
remote server... I guess it''s related to the plugin file access ...
in development , I wrote in the script :
''plugins'': {
"/assets/jwplayer/ova-jw.swf": {
"overlays": {"regions": [{
2006 Jul 15
1
Relationship problem, newbie problem, need help!!
Hey all
I seem to be having some problems with my relationship between a few
tables...
If i then run the following query in mysql, i get the data i want. How
do i do this in rails relationships and models?
select * from shop_addresses
left join shops on shops.id = shop_addresses.shop_id
left join styles on styles.id = shops.style_id
where shop_uri = ''127.0.0.1''
Cheers!!
2009 Sep 15
0
Liquid assign_to
Hello using liquid markup i am trying to do the following.
{{ ''holiday'' | album_thumbs | assign_to ''asset_list'' }}
{% for asset in asset_list %}
"link: " + {{ asset | asset_path }}
{% endfor %}
It should return a list with all assets for the loop, but the asset_list
variable never gets set. It just returns #### (number of records) on
this line:
2011 Sep 27
1
Rails 3.1 assets path for video player Flash script 'player.swf'
I was using a Flash video player within a previous Rails version app
Moving to Rails 3.1.0 , I dob''t know where I should put the script ...
I tried to move it into an app asset sub-directory
assets
- jwplayer
- - player.swf
but this raises an error
"NetworkError: 406 Not Acceptable - http://localhost:3000/assets/jwplayer/player.swf"
player.swf
the flash script is given as a
2011 Oct 25
0
Sprocket Digest + Debug combination broken?
...ind_asset'' sprockets (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/act...
2013 Mar 10
2
css url paths when moving it to a different folder
Hey. Its simple quation, but have litle problem with this.
Its my path for css - assets/content/stylsheets/my.css
Its path picture for background url - assets/images/picture.gif
I do the following in my.css background: transparent
url(../../images/picture.gif).
but the path is not correct, the image is not found. I tried with one
../ and easy images/picture.gif. Not work. When i add picture in
2008 Mar 12
2
nested routes with a 2-way has_many using join table?
I have two classes, InstructionalObject and Assets. They both have_many
of the other, implemented through a join table (so it''s like a habtm
without the habtm).
For the next version of our app, we''re refactoring to RESTful, and i''m
having trouble with my nested resources/routes. I tried this, in
routes.rb:
map.resources :assets do |assets|
assets.resources
2007 May 26
11
RSpec
Hi RSpec Mailing list,
I''m new to RSpec and I am trying to get it running with the caboo.se sample
rails app.
I installed the current version of rspec with rspec_on_rails
I tried to run rake spec but received:
330-07:~/desktop/restful_auth_rspec/vendor multimedia$ rake spec
(in /Users/multimedia/Desktop/restful_auth_rspec)