Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ruby on rails 3.1 move .swf to asset pipeline?

Is it possible to move SWF files to the asset pipeline, and if possible how can this be done?

like image 718
Rubytastic Avatar asked Jan 24 '12 16:01

Rubytastic


1 Answers

I would recommend putting them in a folder called app/assets/flash.

Add this folder to your asset paths:

config.assets.paths << Rails.root.join('app', 'assets', 'flash')

They can be referenced like this in your views:

asset_path('name_of_swf')

The asset_path helper will ensure the correct file is referenced in development and production modes.

like image 117
Richard Hulse Avatar answered Oct 31 '22 13:10

Richard Hulse