Created
June 8, 2011 15:34
-
-
Save courtsimas/1014653 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if profile_route.nil? || !profile_route.respond_to?(profile.to_sym) | |
self.profile_route = {profile.to_sym => panda_video.encodings.find_by_profile_name('h264').url} | |
panda_url = profile.to_sym => panda_video.encodings.find_by_profile_name(profile).url | |
self.profile_route = {profile.to_sym => panda_url} if panda_url.present? | |
self.save | |
else profile_route.has_key?(profile.to_sym) && profile_route[profile.to_sym].blank? | |
self.update_attribute(profile_route[profile.to_sym], panda_video.encodings.find_by_profile_name(profile).url) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment