Module: Machined::Helpers::AssetTagHelpers
- Included in:
- Context
- Defined in:
- lib/machined/helpers/asset_tag_helpers.rb
Instance Method Summary collapse
-
#asset_path(source, options = {}) ⇒ Object
Override asset_path to also work with the Padrino::Helpers::AssetTagHelpers API.
-
#image_path(source, options = {}) ⇒ Object
Redefine image_path to work with Sprockets::Helpers.
Instance Method Details
#asset_path(source, options = {}) ⇒ Object
Override asset_path to also work with the Padrino::Helpers::AssetTagHelpers API.
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/machined/helpers/asset_tag_helpers.rb', line 6 def asset_path(source, = {}) case source when :css path_to_asset , :dir => 'stylesheets', :ext => 'css' when :images path_to_asset , :dir => 'images' when :js path_to_asset , :dir => 'javascripts', :ext => 'js' else path_to_asset source, end end |
#image_path(source, options = {}) ⇒ Object
Redefine image_path to work with Sprockets::Helpers.
20 21 22 |
# File 'lib/machined/helpers/asset_tag_helpers.rb', line 20 def image_path(source, = {}) asset_path source, { :dir => 'images' }.merge() end |