Sha256: 13b1f4123d79f913172ff098c128562f7ff59cdf88d4cd511236e745669a8b2a

Contents?: true

Size: 1.3 KB

Versions: 10

Compression:

Stored size: 1.3 KB

Contents

# require 'spud_core'
# require 'rails'
# require 'action_controller'
# require 'rubygems'
require 'jquery-rails'
require 'retina_tag'
require 'authlogic'
# require 'dynamic_form'
require 'breadcrumbs_on_rails'
require 'will_paginate'
require 'codemirror-rails'

module Spud
  module Core
    class Engine < ::Rails::Engine
      require "#{root}/lib/spud_core/belongs_to_app"
      require "#{root}/lib/spud_core/searchable"

      def self.require_model(model_name)
        require "#{root}/app/models/#{model_name}"
      end

      def self.require_controller(controller_name)
        require "#{root}/app/controllers/#{controller_name}"
      end

      engine_name :spud_core

      initializer :assets do |config|
        Rails.application.config.assets.precompile += [
          "tiny_mce/plugins/**/*",
          "tiny_mce/themes/**/*",
          "tiny_mce/utils/*",
          "tiny_mce/langs/*",
          'tiny_mce/tiny_mce_popup.js',
          "tiny_mce/*",
          "spud/admin*"
        ]
      end

      initializer :controller_overrides do |config|
     	  ActionController::Base.class_eval do
          include Spud::BelongsToApp
     	  end
      end

      initializer :model_overrides do |config|
        ActiveRecord::Base.class_eval do
          include Spud::Searchable
        end
      end

    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
spud_core-0.9.22 lib/spud_core/engine.rb
spud_core-0.9.21 lib/spud_core/engine.rb
spud_core-0.9.20 lib/spud_core/engine.rb
spud_core-0.9.19 lib/spud_core/engine.rb
spud_core-0.9.18 lib/spud_core/engine.rb
spud_core-0.9.17 lib/spud_core/engine.rb
spud_core-0.9.16 lib/spud_core/engine.rb
spud_core-0.9.15 lib/spud_core/engine.rb
spud_core-0.9.14 lib/spud_core/engine.rb
spud_core-0.9.12 lib/spud_core/engine.rb