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.79 lib/caboose/engine.rb
caboose-cms-0.2.78 lib/caboose/engine.rb
caboose-cms-0.2.71 lib/caboose/engine.rb
caboose-cms-0.2.70 lib/caboose/engine.rb
caboose-cms-0.2.68 lib/caboose/engine.rb
caboose-cms-0.2.67 lib/caboose/engine.rb
caboose-cms-0.2.66 lib/caboose/engine.rb
caboose-cms-0.2.65 lib/caboose/engine.rb
caboose-cms-0.2.64 lib/caboose/engine.rb
caboose-cms-0.2.62 lib/caboose/engine.rb
caboose-cms-0.2.57 lib/caboose/engine.rb
caboose-cms-0.2.55 lib/caboose/engine.rb
caboose-cms-0.2.54 lib/caboose/engine.rb
caboose-cms-0.2.52 lib/caboose/engine.rb
caboose-cms-0.2.50 lib/caboose/engine.rb
caboose-cms-0.2.49 lib/caboose/engine.rb
caboose-cms-0.2.48 lib/caboose/engine.rb
caboose-cms-0.2.47 lib/caboose/engine.rb
caboose-cms-0.2.46 lib/caboose/engine.rb
caboose-cms-0.2.45 lib/caboose/engine.rb