Use rails configuration for sounds file path

* Add sounds_path initializer
This commit is contained in:
Thibault Jouan
2011-09-21 21:21:14 +00:00
parent 6af1540640
commit a8067404f4
4 changed files with 8 additions and 3 deletions

View File

@@ -7,7 +7,7 @@ class Sound < ActiveRecord::Base
validates_presence_of :mime_type
def path
"#{Rails.root}/data/sounds/#{sha256}"
"#{Rails.configuration.sounds_path}/#{sha256}"
end
def file=(file)