lib/bigbluebutton_rails/rails/routes.rb in bigbluebutton_rails-1.4.0 vs lib/bigbluebutton_rails/rails/routes.rb in bigbluebutton_rails-2.0.0

- old
+ new

@@ -41,11 +41,12 @@ # You can also change the controllers with: # # bigbluebutton_routes :default, # :controllers => { :servers => "custom_servers", # :rooms => "custom_rooms", - # :recordings => "custom_recordings" } + # :recordings => "custom_recordings", + # :playback_types => "custom_playback_types } # # ==== Room matchers # # Generates matchers to access a room from a different url or inside another resource. # Rooms can belong to users, communities or any other type of "entity" in an aplication. @@ -82,17 +83,18 @@ def bigbluebutton_routes_default(*params) #:nodoc: options = params.extract_options! options_scope = options.has_key?(:scope) ? options[:scope] : BigbluebuttonRails.routing_scope options_as = options.has_key?(:as) ? options[:as] : options_scope - options_only = options.has_key?(:only) ? options[:only] : ["servers", "rooms", "recordings"] + options_only = options.has_key?(:only) ? options[:only] : ["servers", "rooms", "recordings", "playback_types"] BigbluebuttonRails.set_controllers(options[:controllers]) scope options_scope, :as => options_as do add_routes_for_servers if options_only.include?("servers") add_routes_for_rooms if options_only.include?("rooms") add_routes_for_recordings if options_only.include?("recordings") + add_routes_for_playback_types if options_only.include?("playback_types") end end def bigbluebutton_routes_room_matchers(*params) #:nodoc: add_routes_for_rooms @@ -107,10 +109,11 @@ get :invite get :join_mobile post :join post :fetch_recordings get :recordings + post :generate_dial_number end end end def add_routes_for_servers #:nodoc: @@ -135,7 +138,11 @@ post :unpublish end end end + def add_routes_for_playback_types #:nodoc: + resources :playback_types, :only => [:update], + :controller => BigbluebuttonRails.controllers[:playback_types] + end end end