Sha256: 13df4bacc1d313c77178fef6002d5fc49d47b8266eff1c0eb24577c83cfb2340

Contents?: true

Size: 646 Bytes

Versions: 3

Compression:

Stored size: 646 Bytes

Contents

module BigbluebuttonRailsHelper

  # Returns the URL for a QR-code image using Google Charts API
  def qrcode_url(content, size=nil)
    size ||= "200x200"
    content = CGI::escape(content)
    "https://chart.googleapis.com/chart?cht=qr&chs=#{size}&chl=#{content}&choe=UTF-8"
  end

  def bbb_rails_error_explanation
    msgs = ""
    flash.each do |key, msg|
      msgs += content_tag(:div, msg, { :id => "error_explanation", :class => key })
    end
    msgs.html_safe
  end

  # Setup a BigbluebuttonRoom to show in the forms
  def setup_bigbluebutton_room(room)
    (room.metadata.count..10).each { room.metadata.build }
    room
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bigbluebutton_rails-1.3.0.mweb1 app/helpers/bigbluebutton_rails_helper.rb
bigbluebutton_rails-1.3.0 app/helpers/bigbluebutton_rails_helper.rb
bigbluebutton_rails-1.3.0.beta1 app/helpers/bigbluebutton_rails_helper.rb