2013-04-16 02:10:04 +00:00
|
|
|
require 'aws-sdk'
|
|
|
|
|
|
2012-10-26 10:58:02 +00:00
|
|
|
class ApiMusicSessionsController < ApiController
|
2012-11-02 06:52:12 +00:00
|
|
|
|
2012-10-03 03:57:27 +00:00
|
|
|
# have to be signed in currently to see this screen
|
2014-03-05 18:28:10 +00:00
|
|
|
before_filter :api_signed_in_user, :except => [ :add_like, :show, :history_show ]
|
2014-03-03 22:13:23 +00:00
|
|
|
before_filter :lookup_session, only: [:show, :update, :delete, :claimed_recording_start, :claimed_recording_stop, :track_sync]
|
2013-04-17 00:35:42 +00:00
|
|
|
skip_before_filter :api_signed_in_user, only: [:perf_upload]
|
2012-10-03 03:57:27 +00:00
|
|
|
|
|
|
|
|
respond_to :json
|
|
|
|
|
|
|
|
|
|
def index
|
2014-03-06 02:30:40 +00:00
|
|
|
# returns a list of sessions which are hopefully interesting to you as three buckets (concatenated). The 1st bucket
|
|
|
|
|
# is those session to which you've been invited. The 2nd bucket is those sessions which are about a band that you
|
|
|
|
|
# are in or in which a friend is participating. The 3rd bucket is everything else (sessions - invites - friends - bands).
|
2013-01-30 15:43:29 +00:00
|
|
|
# params[:participants] is either nil, meaning "everything", or it's an array of musician ids
|
2012-12-06 01:58:20 +00:00
|
|
|
# params[:genres] is either nil, meaning "everything", or it's an array of genre ids
|
2014-03-06 02:30:40 +00:00
|
|
|
# params[:friends_only] does the obvious. you get invited and friends sessions only.
|
|
|
|
|
# params[:my_bands_only] also does the obvious. you get invited and bands sessions only.
|
|
|
|
|
# params[:keyword] matches only sessions with that text in the description
|
|
|
|
|
# params[:as_musician] only returns sessions you can join as a musician (if true) or listen to a fan (if false)
|
|
|
|
|
# Importantly, friends_only and my_bands_only are ORed not ANDed. So, if you specify both as true, you'll get more
|
|
|
|
|
# results than if only one or the other is true, not fewer. if either is true you won't see the "everything else"
|
|
|
|
|
# sessions.
|
2014-01-25 20:03:14 +00:00
|
|
|
@music_sessions = MusicSession.index(current_user,
|
|
|
|
|
participants: params[:participants],
|
|
|
|
|
genres: params[:genres],
|
|
|
|
|
friends_only: params[:friends_only],
|
|
|
|
|
my_bands_only: params[:my_bands_only],
|
|
|
|
|
keyword: params[:keyword],
|
|
|
|
|
as_musician: params[:as_musician])
|
2012-10-03 03:57:27 +00:00
|
|
|
end
|
|
|
|
|
|
2014-03-06 02:30:40 +00:00
|
|
|
def nindex
|
|
|
|
|
# returns a list of sessions which are hopefully interesting to you as three buckets (concatenated). The 1st bucket
|
|
|
|
|
# is those session to which you've been invited. The 2nd bucket is those sessions which are about a band that you
|
|
|
|
|
# are in or in which a friend is participating. The 3rd bucket is everything else (sessions - invites - friends - bands).
|
|
|
|
|
# pretty much the same as #index above, except scores are also returned.
|
|
|
|
|
# params[:client_id] is the client_id of the client making the call. needed to resovle scoring.
|
|
|
|
|
# params[:participants] is either nil, meaning "everything", or it's an array of musician ids
|
|
|
|
|
# params[:genres] is either nil, meaning "everything", or it's an array of genre ids
|
|
|
|
|
# params[:friends_only] does the obvious. you get invited and friends sessions only.
|
|
|
|
|
# params[:my_bands_only] also does the obvious. you get invited and bands sessions only.
|
|
|
|
|
# params[:keyword] matches only sessions with that text in the description
|
|
|
|
|
# params[:as_musician] only returns sessions you can join as a musician (if true) or listen to a fan (if false)
|
|
|
|
|
# params[:offset] also does the obvious, starts at offset in the results (e.g. 0)
|
|
|
|
|
# params[:limit] also does the obvious, limits number of rows returned (e.g. 20)
|
|
|
|
|
# Importantly, friends_only and my_bands_only are ORed not ANDed. So, if you specify both as true, you'll get more
|
|
|
|
|
# results than if only one or the other is true, not fewer. if either is true you won't see the "everything else"
|
|
|
|
|
# sessions.
|
|
|
|
|
@music_sessions = MusicSession.nindex(current_user,
|
|
|
|
|
client_id: params[:client_id],
|
|
|
|
|
participants: params[:participants],
|
|
|
|
|
genres: params[:genres],
|
|
|
|
|
friends_only: params[:friends_only],
|
|
|
|
|
my_bands_only: params[:my_bands_only],
|
|
|
|
|
keyword: params[:keyword],
|
|
|
|
|
as_musician: params[:as_musician],
|
|
|
|
|
offset: params[:offset],
|
|
|
|
|
limit: params[:limit])
|
|
|
|
|
end
|
|
|
|
|
|
2012-10-03 03:57:27 +00:00
|
|
|
def create
|
2012-11-30 15:30:30 +00:00
|
|
|
client_id = params[:client_id]
|
|
|
|
|
|
|
|
|
|
if client_id.nil?
|
|
|
|
|
raise JamArgumentError, "client_id must be specified"
|
2012-10-23 11:43:52 +00:00
|
|
|
end
|
|
|
|
|
|
2013-07-09 05:37:58 +00:00
|
|
|
if !params[:intellectual_property]
|
|
|
|
|
raise JamArgumentError, "You must agree to the intellectual property terms"
|
|
|
|
|
end
|
|
|
|
|
|
2013-02-08 03:20:45 +00:00
|
|
|
band = Band.find(params[:band]) unless params[:band].nil?
|
|
|
|
|
|
2012-11-30 15:30:30 +00:00
|
|
|
@music_session = MusicSessionManager.new.create(
|
|
|
|
|
current_user,
|
|
|
|
|
client_id,
|
|
|
|
|
params[:description],
|
|
|
|
|
params[:musician_access],
|
|
|
|
|
params[:approval_required],
|
|
|
|
|
params[:fan_chat],
|
|
|
|
|
params[:fan_access],
|
|
|
|
|
band,
|
|
|
|
|
params[:genres],
|
2012-12-09 22:11:38 +00:00
|
|
|
params[:tracks],
|
|
|
|
|
params[:legal_terms])
|
2012-11-30 15:30:30 +00:00
|
|
|
|
2012-10-25 12:12:51 +00:00
|
|
|
if @music_session.errors.any?
|
2012-10-27 22:26:45 +00:00
|
|
|
# we have to do this because api_session_detail_url will fail with a bad @music_session
|
2012-10-25 12:12:51 +00:00
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @music_session
|
|
|
|
|
else
|
|
|
|
|
respond_with @music_session, responder: ApiResponder, :location => api_session_detail_url(@music_session)
|
|
|
|
|
end
|
2012-10-03 03:57:27 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def show
|
2012-11-02 06:52:12 +00:00
|
|
|
unless @music_session.can_see? current_user
|
|
|
|
|
raise ActiveRecord::RecordNotFound
|
|
|
|
|
end
|
2012-10-03 03:57:27 +00:00
|
|
|
end
|
|
|
|
|
|
2012-12-11 22:59:09 +00:00
|
|
|
def update
|
|
|
|
|
@music_session = MusicSessionManager.new.update(
|
|
|
|
|
@music_session,
|
2013-06-11 01:25:59 +00:00
|
|
|
params[:description],
|
|
|
|
|
params[:genres],
|
|
|
|
|
params[:musician_access],
|
|
|
|
|
params[:approval_required],
|
|
|
|
|
params[:fan_chat],
|
|
|
|
|
params[:fan_access])
|
|
|
|
|
|
|
|
|
|
if @music_session.errors.any?
|
|
|
|
|
# we have to do this because api_session_detail_url will fail with a bad @music_session
|
|
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @music_session
|
|
|
|
|
else
|
|
|
|
|
respond_with @music_session, responder: ApiResponder, :location => api_session_detail_url(@music_session)
|
|
|
|
|
end
|
2012-12-11 22:59:09 +00:00
|
|
|
end
|
|
|
|
|
|
2012-10-04 02:09:01 +00:00
|
|
|
def participant_show
|
2012-10-23 12:44:17 +00:00
|
|
|
@connection = Connection.find_by_client_id(params[:id])
|
2012-10-03 03:57:27 +00:00
|
|
|
end
|
|
|
|
|
|
2012-10-04 02:09:01 +00:00
|
|
|
def participant_create
|
2012-11-30 15:30:30 +00:00
|
|
|
@connection = MusicSessionManager.new.participant_create(
|
|
|
|
|
current_user,
|
|
|
|
|
params[:id],
|
|
|
|
|
params[:client_id],
|
|
|
|
|
params[:as_musician],
|
|
|
|
|
params[:tracks])
|
2012-10-23 11:43:52 +00:00
|
|
|
|
2012-11-30 15:30:30 +00:00
|
|
|
if @connection.errors.any?
|
|
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @connection
|
|
|
|
|
else
|
|
|
|
|
respond_with @connection, responder: ApiResponder, :location => api_session_participant_detail_url(@connection.client_id)
|
|
|
|
|
end
|
2012-10-03 03:57:27 +00:00
|
|
|
end
|
|
|
|
|
|
2012-10-04 02:09:01 +00:00
|
|
|
def participant_delete
|
2012-11-30 15:30:30 +00:00
|
|
|
client_id = params[:id]
|
2013-12-17 16:58:35 +00:00
|
|
|
if client_id.present? && client_id != 'undefined'
|
|
|
|
|
@connection = Connection.find_by_client_id!(client_id)
|
|
|
|
|
music_session = MusicSession.find(@connection.music_session_id)
|
|
|
|
|
MusicSessionManager.new.participant_delete(current_user, @connection, music_session)
|
|
|
|
|
end
|
2012-10-23 11:43:52 +00:00
|
|
|
respond_with @connection, responder: ApiResponder
|
2012-10-03 03:57:27 +00:00
|
|
|
end
|
2012-11-04 03:22:35 +00:00
|
|
|
|
2013-09-30 02:37:22 +00:00
|
|
|
def participant_rating
|
2014-05-07 01:33:27 +00:00
|
|
|
if @history = MusicSessionUserHistory.latest_history(params[:client_id])
|
2014-05-01 01:48:57 +00:00
|
|
|
if request.post?
|
|
|
|
|
@history.add_rating(params[:rating], params[:comment])
|
|
|
|
|
@history.save
|
|
|
|
|
|
|
|
|
|
if @history.errors.any?
|
|
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @history
|
|
|
|
|
else
|
2014-05-07 01:33:27 +00:00
|
|
|
if @history.good_rating? && @history.user.first_good_music_session_at.nil?
|
|
|
|
|
@history.user.first_good_music_session_at = Time.now
|
|
|
|
|
@history.user.save
|
|
|
|
|
end
|
2014-05-01 01:48:57 +00:00
|
|
|
render :json => {}, :status => :ok
|
|
|
|
|
end
|
2014-05-01 06:35:16 +00:00
|
|
|
elsif request.get?
|
|
|
|
|
render :json => { :should_rate_session => @history.should_rate_session? }, :status => :ok
|
2013-09-30 02:37:22 +00:00
|
|
|
end
|
2014-04-30 14:07:23 +00:00
|
|
|
else
|
|
|
|
|
render :json => { :message => ValidationMessages::SESSION_NOT_FOUND }, :status => 404
|
|
|
|
|
end
|
2013-09-30 02:37:22 +00:00
|
|
|
end
|
|
|
|
|
|
2012-12-15 07:10:42 +00:00
|
|
|
def track_index
|
|
|
|
|
@tracks = Track.index(current_user, params[:id])
|
|
|
|
|
end
|
|
|
|
|
|
2012-12-16 15:53:48 +00:00
|
|
|
def track_show
|
|
|
|
|
begin
|
|
|
|
|
@track = Track.joins(:connection)
|
|
|
|
|
.where(:connections => {:user_id => "#{current_user.id}"})
|
|
|
|
|
.find(params[:track_id])
|
|
|
|
|
|
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
|
render :json => { :message => ValidationMessages::TRACK_NOT_FOUND }, :status => 404
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2013-11-16 04:35:40 +00:00
|
|
|
def track_sync
|
2014-03-03 22:13:23 +00:00
|
|
|
@tracks = MusicSessionManager.new.sync_tracks(@music_session, params[:client_id], params[:tracks])
|
2013-11-16 04:35:40 +00:00
|
|
|
|
|
|
|
|
unless @tracks.kind_of? Array
|
2014-03-03 22:13:23 +00:00
|
|
|
# we have to do this because api_session_detail_url will fail with a bad @tracks
|
2013-11-16 04:35:40 +00:00
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @tracks
|
|
|
|
|
else
|
|
|
|
|
respond_with @tracks, responder: ApiResponder
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2012-12-15 07:10:42 +00:00
|
|
|
def track_create
|
|
|
|
|
@track = Track.save(nil,
|
|
|
|
|
params[:connection_id],
|
|
|
|
|
params[:instrument_id],
|
2013-11-16 04:35:40 +00:00
|
|
|
params[:sound],
|
|
|
|
|
params[:client_track_id])
|
2013-05-22 11:48:37 +00:00
|
|
|
|
2012-12-16 13:25:38 +00:00
|
|
|
respond_with @track, responder: ApiResponder, :status => 201, :location => api_session_track_detail_url(@track.connection.music_session, @track)
|
2012-12-15 07:10:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def track_update
|
2012-12-16 15:53:48 +00:00
|
|
|
begin
|
|
|
|
|
@track = Track.save(params[:track_id],
|
|
|
|
|
nil,
|
|
|
|
|
params[:instrument_id],
|
2013-11-16 04:35:40 +00:00
|
|
|
params[:sound],
|
|
|
|
|
params[:client_track_id])
|
2012-12-16 15:53:48 +00:00
|
|
|
|
|
|
|
|
respond_with @track, responder: ApiResponder, :status => 200
|
|
|
|
|
|
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
|
render :json => { :message => ValidationMessages::TRACK_NOT_FOUND }, :status => 404
|
|
|
|
|
end
|
2012-12-15 07:10:42 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def track_destroy
|
2012-12-16 15:53:48 +00:00
|
|
|
begin
|
|
|
|
|
@track = Track.find(params[:track_id])
|
|
|
|
|
unless @track.nil?
|
|
|
|
|
@track.delete
|
|
|
|
|
respond_with responder: ApiResponder, :status => 204
|
|
|
|
|
end
|
|
|
|
|
rescue ActiveRecord::RecordNotFound
|
|
|
|
|
render :json => { :message => ValidationMessages::TRACK_NOT_FOUND }, :status => 404
|
2012-12-15 07:10:42 +00:00
|
|
|
end
|
|
|
|
|
end
|
2013-03-27 15:16:20 +00:00
|
|
|
|
|
|
|
|
def perf_upload
|
2013-05-06 00:18:24 +00:00
|
|
|
# example of using curl to access this API:
|
|
|
|
|
# curl -L -T some_file -X PUT http://localhost:3000/api/sessions/[SESSION_ID]/perf.json?client_id=[CLIENT_ID]
|
|
|
|
|
|
2014-02-14 01:50:56 +00:00
|
|
|
music_session_history = MusicSessionHistory.find(params[:id])
|
2013-09-24 00:58:59 +00:00
|
|
|
msuh = MusicSessionUserHistory.find_by_client_id(params[:client_id])
|
2013-03-27 15:16:20 +00:00
|
|
|
|
2013-09-24 00:58:59 +00:00
|
|
|
@perfdata = MusicSessionPerfData.new
|
2013-04-16 02:10:04 +00:00
|
|
|
@perfdata.client_id = params[:client_id]
|
2013-09-24 00:58:59 +00:00
|
|
|
@perfdata.music_session_history = music_session_history
|
2013-05-06 00:18:24 +00:00
|
|
|
unless @perfdata.save
|
2013-04-16 02:10:04 +00:00
|
|
|
# we have to do this because api_session_detail_url will fail with a bad @music_session
|
|
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @perfdata
|
|
|
|
|
return
|
|
|
|
|
end
|
|
|
|
|
|
2014-02-13 16:41:50 +00:00
|
|
|
if Rails.application.config.storage_type == :fog
|
2013-09-18 15:23:22 +00:00
|
|
|
uri = @perfdata.uri
|
2014-02-13 16:41:50 +00:00
|
|
|
s3 = AWS::S3.new(:access_key_id => Rails.application.config.aws_access_key_id,
|
|
|
|
|
:secret_access_key => Rails.application.config.aws_secret_access_key)
|
2013-04-16 02:10:04 +00:00
|
|
|
bucket = s3.buckets[SampleApp::Application.config.aws_bucket]
|
2013-05-06 00:18:24 +00:00
|
|
|
|
2013-12-22 04:01:25 +00:00
|
|
|
expire = Time.now + 20.years
|
2013-07-30 17:32:13 +00:00
|
|
|
read_url = bucket.objects[uri].url_for(:read,
|
2013-12-22 04:01:25 +00:00
|
|
|
:expires => expire,
|
2013-07-30 17:32:13 +00:00
|
|
|
:'response_content_type' => 'text/csv').to_s
|
|
|
|
|
@perfdata.update_attribute(:uri, read_url)
|
2013-12-22 04:01:25 +00:00
|
|
|
logger.debug("*** client can read url #{read_url}")
|
2013-07-30 17:32:13 +00:00
|
|
|
|
|
|
|
|
write_url = bucket.objects[uri].url_for(:write,
|
2013-12-22 04:01:25 +00:00
|
|
|
:expires => expire,
|
2013-07-30 17:32:13 +00:00
|
|
|
:'response_content_type' => 'text/csv').to_s
|
2013-09-18 15:23:22 +00:00
|
|
|
logger.debug("*** client can upload to url #{write_url}")
|
2013-07-30 17:32:13 +00:00
|
|
|
redirect_to write_url
|
2013-05-06 00:18:24 +00:00
|
|
|
|
2013-04-16 02:10:04 +00:00
|
|
|
else
|
|
|
|
|
if params[:redirected_back].nil? || !params[:redirected_back]
|
2013-03-27 15:16:20 +00:00
|
|
|
# first time that a client has asked to do a PUT (not redirected back here)
|
2013-05-06 00:18:24 +00:00
|
|
|
redirect_to request.fullpath + '&redirected_back=true'
|
2013-03-27 15:16:20 +00:00
|
|
|
else
|
2013-04-16 02:10:04 +00:00
|
|
|
# we should store it here to aid in development, but we don't have to until someone wants the feature
|
|
|
|
|
# so... just return 200
|
|
|
|
|
render :json => { :id => @perfdata.id }, :status => 200
|
2013-03-27 15:16:20 +00:00
|
|
|
end
|
2014-01-05 03:47:23 +00:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2014-01-12 17:51:06 +00:00
|
|
|
def add_comment
|
|
|
|
|
if params[:id].blank?
|
|
|
|
|
render :json => { :message => "Session ID is required" }, :status => 400
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if params[:user_id].blank?
|
|
|
|
|
render :json => { :message => "User ID is required" }, :status => 400
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
if params[:comment].blank?
|
|
|
|
|
render :json => { :message => "Comment is required" }, :status => 400
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
comment = MusicSessionComment.new
|
|
|
|
|
comment.music_session_id = params[:id]
|
|
|
|
|
comment.creator_id = params[:user_id]
|
|
|
|
|
comment.comment = params[:comment]
|
2014-01-14 07:49:21 +00:00
|
|
|
comment.ip_address = request.remote_ip
|
2014-01-12 17:51:06 +00:00
|
|
|
comment.save
|
|
|
|
|
|
|
|
|
|
if comment.errors.any?
|
|
|
|
|
render :json => { :message => "Unexpected error occurred" }, :status => 500
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
else
|
|
|
|
|
render :json => {}, :status => 201
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def add_like
|
|
|
|
|
if params[:id].blank?
|
|
|
|
|
render :json => { :message => "Session ID is required" }, :status => 400
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
liker = MusicSessionLiker.new
|
|
|
|
|
liker.music_session_id = params[:id]
|
|
|
|
|
liker.liker_id = params[:user_id]
|
2014-01-14 07:49:21 +00:00
|
|
|
liker.ip_address = request.remote_ip
|
2014-01-12 17:51:06 +00:00
|
|
|
liker.save
|
|
|
|
|
|
|
|
|
|
if liker.errors.any?
|
|
|
|
|
render :json => { :message => "Unexpected error occurred" }, :status => 500
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
else
|
|
|
|
|
render :json => {}, :status => 201
|
2014-01-28 07:35:35 +00:00
|
|
|
return
|
2014-01-12 17:51:06 +00:00
|
|
|
end
|
|
|
|
|
end
|
2014-01-05 03:47:23 +00:00
|
|
|
|
2014-03-05 18:28:10 +00:00
|
|
|
def history_show
|
2014-02-14 01:50:56 +00:00
|
|
|
@history = MusicSessionHistory.find(params[:id])
|
2014-01-31 06:39:09 +00:00
|
|
|
end
|
|
|
|
|
|
2014-01-05 03:47:23 +00:00
|
|
|
def claimed_recording_start
|
|
|
|
|
@music_session.claimed_recording_start(current_user, ClaimedRecording.find(params[:claimed_recording_id]))
|
|
|
|
|
|
|
|
|
|
if @music_session.errors.any?
|
|
|
|
|
# we have to do this because api_session_detail_url will fail with a bad @music_session
|
|
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @music_session
|
|
|
|
|
else
|
|
|
|
|
respond_with @music_session, responder: ApiResponder
|
|
|
|
|
end
|
|
|
|
|
end
|
2013-03-27 15:16:20 +00:00
|
|
|
|
2014-01-05 03:47:23 +00:00
|
|
|
def claimed_recording_stop
|
|
|
|
|
@music_session.claimed_recording_stop
|
|
|
|
|
|
|
|
|
|
if @music_session.errors.any?
|
|
|
|
|
# we have to do this because api_session_detail_url will fail with a bad @music_session
|
|
|
|
|
response.status = :unprocessable_entity
|
|
|
|
|
respond_with @music_session
|
|
|
|
|
else
|
|
|
|
|
respond_with @music_session, responder: ApiResponder
|
2013-03-27 15:16:20 +00:00
|
|
|
end
|
2014-01-05 03:47:23 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
private
|
2013-03-27 15:16:20 +00:00
|
|
|
|
2014-01-05 03:47:23 +00:00
|
|
|
def lookup_session
|
|
|
|
|
@music_session = MusicSession.find(params[:id])
|
2013-03-27 15:16:20 +00:00
|
|
|
end
|
2014-01-05 03:47:23 +00:00
|
|
|
|
2012-10-04 02:09:01 +00:00
|
|
|
end
|