Sha256: 82ca4e4d1dbcd8a51a467e801eda196494042776aaec1cc03b4bca3c87b59d17

Contents?: true

Size: 836 Bytes

Versions: 6

Compression:

Stored size: 836 Bytes

Contents

require "qwester/engine"
require 'acts_as_list'
require 'paperclip'
require 'random_string'
require_relative 'rails/actionpack/lib/action_controller/base'

module Qwester
  
  def self.active_admin_load_path
    File.expand_path("active_admin/admin", File.dirname(__FILE__))
  end
  
  def self.active_admin_menu
    if @active_admin_menu == 'none'
      return nil
    elsif @active_admin_menu
      @active_admin_menu
    else
      'Qwester'
    end
  end
  
  def self.active_admin_menu=(menu)
    @active_admin_menu = menu
  end
  
  def self.session_key
    @session_key || :qwester_answer_store
  end
  
  def self.session_key=(key)
    @session_key = key
  end

  def self.rails_version
    @rails_version ||= Rails.version.split('.').first if defined? Rails
  end

  def self.rails_three?
    rails_version == '3'
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
qwester-0.4.0 lib/qwester.rb
qwester-0.3.5 lib/qwester.rb
qwester-0.3.4 lib/qwester.rb
qwester-0.3.3 lib/qwester.rb
qwester-0.3.2 lib/qwester.rb
qwester-0.3.1 lib/qwester.rb