Sha256: 5e20dbf0634ffbfea56e918f1e4080865bde0905847bb0b737fcc2f7bcc58a16

Contents?: true

Size: 796 Bytes

Versions: 11

Compression:

Stored size: 796 Bytes

Contents

module Qbrick
  module AdminHelper
    #
    # When rendering the layout of our host application,
    # the paths of the host application are not visible to the engine
    # therefore we delegate all failing helper calls to 'main_app',
    # which is our host application
    #
    def method_missing(method, *args, &block)
      main_app.send(method, *args, &block)
    rescue NoMethodError => exception
      bc = ::ActiveSupport::BacktraceCleaner.new
      bc.add_silencer { |l| l =~ /^#{__FILE__}.+#{__method__}'?$/ }
      exception.set_backtrace bc.clean(exception.backtrace)

      raise exception
    end

    def sublime_video_include_tag
      token = Qbrick::Engine.config.sublime_video_token
      javascript_include_tag "//cdn.sublimevideo.net/js/#{token}-beta.js"
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
qbrick-2.7.1 app/helpers/qbrick/admin_helper.rb
qbrick-2.7 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.10 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.9 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.8 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.7 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.6 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.5 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.4 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.3 app/helpers/qbrick/admin_helper.rb
qbrick-2.6.2 app/helpers/qbrick/admin_helper.rb