diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 7e9fd652b..ee0abd903 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -129,16 +129,15 @@ module ApplicationHelper if File.exist?(disk_filename(source.class, source.id)) if source.class.to_s == 'User' File.join(relative_path, ["#{source.class}", "#{source.id}"]) - else - File.join("images/avatars", ["#{source.class}", "#{source.id}"]) + elseavatars", ["#{source.class}", "#{source.id}"]) end elsif source.class.to_s == 'User' str = source.user_extension.try(:gender).to_i == 0 ? "b" : "g" File.join(relative_path, "#{source.class}", str) elsif source.class.to_s == 'Subject' - File.join("images","educoder", "index", "subject", "subject#{rand(17)}.jpg") + File.join("educoder", "index", "subject", "subject#{rand(17)}.jpg") elsif source.class.to_s == 'Shixun' - File.join("images","educoder", "index", "shixun", "shixun#{rand(23)}.jpg") + File.join("educoder","index", "shixun", "shixun#{rand(23)}.jpg") end end