Sha256: 9ed786400710df9fc5138939ada2f7c1cd59cbb684209ce3ec06065b25626145

Contents?: true

Size: 586 Bytes

Versions: 7

Compression:

Stored size: 586 Bytes

Contents

require 'sinatra/base'
require 'qcourses/resource_paths'
require 'haml'
module Qcourses
  class BaseController < Sinatra::Application
    include ResourcePaths
    include Configuration
    set :root, Proc.new { Qcourses.config.root }
    set :public_folder, File.expand_path('../../../public/', File.dirname(__FILE__))
    resource_admin_on '/admin'

    helpers do
      include ViewHelpers
      include Renderers
      def javascript(javascript_name)
        haml "%script(src='/javascript/#{javascript_name}' type='text/javascript' )", :layout => false
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
qcourses-0.1.8 lib/qcourses/controllers/base.rb
qcourses-0.1.7 lib/qcourses/controllers/base.rb
qcourses-0.1.6 lib/qcourses/controllers/base.rb
qcourses-0.1.5 lib/qcourses/controllers/base.rb
qcourses-0.1.4 lib/qcourses/controllers/base.rb
qcourses-0.1.3 lib/qcourses/controllers/base.rb
qcourses-0.1.2 lib/qcourses/controllers/base.rb