Changeset 1117
- Timestamp:
- 07/30/07 12:53:50 (1 year ago)
- Files:
-
- trunk/app/controllers/casts_controller.rb (modified) (1 diff)
- trunk/app/models/cast.rb (modified) (2 diffs)
- trunk/public/static (added)
- trunk/public/static/cast (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/controllers/casts_controller.rb
r1002 r1117 45 45 type = "application/mp3" 46 46 end 47 send_file @cast.path(format), :type => type, :filename => "audiobank-#{@cast.name}.#{format}", :disposition => "inline"47 redirect_to "/static/cast/#{@cast.filename(format)}" 48 48 end 49 49 trunk/app/models/cast.rb
r794 r1117 16 16 17 17 def path(format = "ogg") 18 "#{RAILS_ROOT}/media/cast/#{id}.#{format}" 18 "#{RAILS_ROOT}/media/cast/#{filename(format)}" 19 end 20 21 def filename(format = "ogg") 22 "#{id}.#{format}" 19 23 end 20 24 … … 48 52 end 49 53 end 50 end 54 end 51 55 end 52 56 end
