mirror of
https://github.com/wahyd4/ocelots.git
synced 2026-08-09 04:56:21 +10:00
9 lines
314 B
Ruby
9 lines
314 B
Ruby
module Soundcloudvalidate
|
|
def process_sc_embed_code object, owner
|
|
return unless object
|
|
return unless owner == current_person
|
|
object.track = $1 if params[:sc_embed_code] =~ /tracks%2F(\d+)/
|
|
object.secret = $1 if params[:sc_embed_code] =~ /secret_token%3D(s-[0-9a-zA-Z]+)/
|
|
object.save
|
|
end
|
|
end |