Class: Bigbluebutton::RecordingsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Bigbluebutton::RecordingsController
- Defined in:
- app/controllers/bigbluebutton/recordings_controller.rb
Instance Method Summary collapse
- #destroy ⇒ Object
- #determine_layout ⇒ Object
- #edit ⇒ Object
- #index ⇒ Object
- #play ⇒ Object
- #publish ⇒ Object
- #show ⇒ Object
- #unpublish ⇒ Object
- #update ⇒ Object
Methods included from BigbluebuttonRails::InternalControllerMethods
Instance Method Details
#destroy ⇒ Object
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 46 def destroy error = false begin @recording.destroy = t('bigbluebutton_rails.recordings.notice.destroy.success') rescue BigBlueButton::BigBlueButtonException => e error = true = t('bigbluebutton_rails.recordings.notice.destroy.success_with_bbb_error', :error => e.to_s[0..200]) end respond_with do |format| format.html { if error flash[:error] = redirect_to_using_params else redirect_to_using_params , :notice => end } end end |
#determine_layout ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 11 def determine_layout case params[:action].to_sym when :play false else 'application' end end |
#edit ⇒ Object
29 30 31 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 29 def edit respond_with(@recording) end |
#index ⇒ Object
20 21 22 23 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 20 def index @recordings ||= BigbluebuttonRecording.all respond_with(@recordings) end |
#play ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 68 def play if @recording.present? if @playback if BigbluebuttonRails.configuration.playback_url_authentication uri = @recording.token_url(, request.remote_ip, @playback) @playback_url = uri else @playback_url = @playback.url end if @playback.downloadable? || !BigbluebuttonRails.configuration.playback_iframe redirect_to @playback_url end # else will render the default 'play' view else flash[:error] = t('bigbluebutton_rails.recordings.errors.play.no_format') redirect_to_using_params (@recording) end else flash[:error] = t('bigbluebutton_rails.recordings.errors.destroyed') redirect_to my_home_path end end |
#publish ⇒ Object
91 92 93 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 91 def publish self.publish_unpublish(true) end |
#show ⇒ Object
25 26 27 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 25 def show respond_with(@recording) end |
#unpublish ⇒ Object
95 96 97 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 95 def unpublish self.publish_unpublish(false) end |
#update ⇒ Object
33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'app/controllers/bigbluebutton/recordings_controller.rb', line 33 def update respond_with @recording do |format| if @recording.update_attributes(recording_params) format.html { = t('bigbluebutton_rails.recordings.notice.update.success') redirect_to_using_params @recording, :notice => } else format.html { redirect_to_params_or_render :edit } end end end |