Sha256: 59974d614e2f95832d796c2de9d3eb85b1c54e1ad62d1dc112f5407a5269c456

Contents?: true

Size: 1.17 KB

Versions: 10

Compression:

Stored size: 1.17 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'
require 'tinymce-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 += [
          "tinymce/plugins/**/*",
          "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-1.0.6 lib/spud_core/engine.rb
spud_core-1.0.5 lib/spud_core/engine.rb
spud_core-1.0.4 lib/spud_core/engine.rb
spud_core-1.0.3 lib/spud_core/engine.rb
spud_core-1.0.2 lib/spud_core/engine.rb
spud_core-1.0.1 lib/spud_core/engine.rb
spud_core-1.0.0 lib/spud_core/engine.rb
spud_core-1.0.0.rc2 lib/spud_core/engine.rb
spud_core-1.0.0.rc1.1 lib/spud_core/engine.rb
spud_core-1.0.0.rc1 lib/spud_core/engine.rb