* fixing controller

This commit is contained in:
Seth Call 2014-02-06 21:44:49 +00:00
parent 1c6c1da027
commit 7e1d5c1e4e
2 changed files with 3 additions and 3 deletions

View File

@ -6,9 +6,9 @@ class ShareTokensController < ApplicationController
share_token = ShareToken.find_by_token!(params[:id])
# TODO: clean this up later to truly use polymorphic associations
if share_token.shareable_type == "session"
redirect_to music_session_detail(share_token.shareable_id)
redirect_to music_session_detail_url(share_token.shareable_id)
else
redirect_to recording_detail(share_token.shareable_id)
redirect_to recording_detail_url(share_token.shareable_id)
end
end
end

View File

@ -7,7 +7,7 @@ object @claimed_recording
attributes :id, :name, :description, :is_public, :is_downloadable, :genre_id
node :share_url do|claimed_recording|
share_token_url(claimed_recording.share_token.token)
share_token_url(claimed_recording .share_token.token)
end
child(:recording => :recording) {