Use rails configuration for sounds file path
* Add sounds_path initializer
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user