Skip to content

How to: friendly join urls

Leonardo Crauss Daronco edited this page Aug 28, 2013 · 2 revisions

By default BigbluebuttonRails generates routes scoped with the word bigbluebutton. Therefore, the routes to join a conference will be similar to /bigbluebutton/rooms/my-room/join and /bigbluebutton/rooms/my-room/invite.

These are not very friendly URLs, tough. You might want your users to have an easy-to-remember URL for their conference room. Do to so, you can use the example below:

match '/conf/:id', :to => 'bigbluebutton/rooms#invite', :as => "join_webconf"

This will create routes such as /conf/my-room. If you combine this with attributing the name of the rooms to a user ID, you can have routes such as /conf/rick-astley. This example will also create the helper join_webconf_path that returns the path to this URL.

Notice that the route points to the action invite instead of join. Doing so, this URL can be shared with people that don't have an account on your website.

Clone this wiki locally