Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (21 sloc) 0.635 kB
require 'rho/rhocontroller'
class RingtonesController < Rho::RhoController
@layout = :simplelayout
def index
Rho::RingtoneManager.stop
@ringtones = Rho::RingtoneManager.get_all_ringtones
@ringtones = [] if @ringtones.nil?
render :back => '/app'
end
def play
puts "Play ringtone"
$selected = @params['name']
Rho::RingtoneManager.play @params['file']
render :action => :playing, :layout => false, :back => url_for( :action => :index )
end
def stop
puts "Stop playing"
Rho::RingtoneManager.stop
redirect :action => :index, :back => url_for( :action => :index )
end
end
Jump to Line
Something went wrong with that request. Please try again.