lib/bigbluebutton_rails/rails/routes.rb in bigbluebutton_rails-0.0.2 vs lib/bigbluebutton_rails/rails/routes.rb in bigbluebutton_rails-0.0.3

- old
+ new

@@ -45,11 +45,11 @@ # { :action=>"running", :controller=>"bigbluebutton/rooms" } # # ==== Room matchers # # Generates matchers to access a room from a different url or inside another resource. - # It creates routes to the actions #show, #join, #running, and #end. + # It creates routes to the actions #show, #join, #running, #end, #invite, and #auth. # # bigbluebutton_routes :room_matchers # # You can, for example, create routes associated with users: # @@ -61,14 +61,18 @@ # # user_room GET /users/:user_id/room/:id(.:format) # { :controller=>"bigbluebutton/rooms", :action=>"show" } # user_join_room GET /users/:user_id/room/:id/join(.:format) # { :controller=>"bigbluebutton/rooms", :action=>"join" } + # user_auth_room POST /users/:user_id/room/:id/join(.:format) + # { :controller=>"bigbluebutton/rooms", :action=>"auth" } # user_running_room GET /users/:user_id/room/:id/running(.:format) # { :controller=>"bigbluebutton/rooms", :action=>"running" } # user_end_room GET /users/:user_id/room/:id/end(.:format) # { :controller=>"bigbluebutton/rooms", :action=>"end" } + # user_invite_room GET /users/:user_id/room/:id/invite(.:format) + # { :controller=>"bigbluebutton/rooms", :action=>"invite" } # def bigbluebutton_routes(*params) options = params.extract_options! send("bigbluebutton_routes_#{params[0].to_s}", options) end @@ -83,19 +87,24 @@ resources :servers, :controller => 'bigbluebutton/servers' do resources :rooms, :controller => 'bigbluebutton/rooms' do get :join, :on => :member get :running, :on => :member get :end, :on => :member + get :invite, :on => :member + post :join, :on => :member, :action => :auth end end end end def bigbluebutton_routes_room_matchers(*params) #:nodoc: + # TODO This is generating helpers like "user_running_room" instead of "running_user_room" get 'room/:id' => 'bigbluebutton/rooms#show', :as => 'room' get 'room/:id/join' => 'bigbluebutton/rooms#join', :as => 'join_room' + post 'room/:id/join' => 'bigbluebutton/rooms#auth', :as => 'join_room' get 'room/:id/running' => 'bigbluebutton/rooms#running', :as => 'running_room' get 'room/:id/end' => 'bigbluebutton/rooms#end', :as => 'end_room' + get 'room/:id/invite' => 'bigbluebutton/rooms#invite', :as => 'invite_room' end end end