Sha256: 0d4b58ec865bb6f2f17a493fe386fb66608888f6840caaca0e54d718975169fb

Contents?: true

Size: 1.24 KB

Versions: 34

Compression:

Stored size: 1.24 KB

Contents

require 'tinymce-rails'
require 'jquery-ui-rails'
#require 'modeljs'
require 'colorbox-rails'
require 'paperclip'

module Caboose

  def Caboose.log(message, title = nil)
    if (Rails.logger.nil?)
      puts "\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
      puts title.to_s unless title.nil?
      puts message
      puts ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n"
    else
      Rails.logger.debug("\n>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")
      Rails.logger.debug(title.to_s) unless title.nil?
      Rails.logger.debug(message)
      Rails.logger.debug(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n")
    end
  end
  
  def Caboose.plugin_hook(*args)
    resp = nil
    args[0] = args[0].to_sym 
    Caboose.plugins.each do |mod|
      #resp = mod.constantize.send(*args)
      if (mod.constantize.respond_to?(args[0]))
        resp = mod.constantize.send(*args)
      end
    end
    return resp
  end
  
  def Caboose.json(obj, defaultvalue = "")
    return defaultvalue.to_json if obj.nil?
    return obj.to_json
  end
  
  class Engine < ::Rails::Engine
    isolate_namespace Caboose
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
caboose-cms-0.2.44 lib/caboose/engine.rb
caboose-cms-0.2.43 lib/caboose/engine.rb
caboose-cms-0.2.42 lib/caboose/engine.rb
caboose-cms-0.2.41 lib/caboose/engine.rb
caboose-cms-0.2.40 lib/caboose/engine.rb
caboose-cms-0.2.39 lib/caboose/engine.rb
caboose-cms-0.2.38 lib/caboose/engine.rb
caboose-cms-0.2.37 lib/caboose/engine.rb
caboose-cms-0.2.36 lib/caboose/engine.rb
caboose-cms-0.2.35 lib/caboose/engine.rb
caboose-cms-0.2.34 lib/caboose/engine.rb
caboose-cms-0.2.33 lib/caboose/engine.rb
caboose-cms-0.2.32 lib/caboose/engine.rb
caboose-cms-0.2.31 lib/caboose/engine.rb