Sha256: d33c65eed6329d9b29622f215caf080b59df1946151bdd53218aa6fa8569a5b4

Contents?: true

Size: 1.13 KB

Versions: 1

Compression:

Stored size: 1.13 KB

Contents

require 'haml-rails'
require 'sass-rails'
require 'coffee-rails'
require 'jquery-rails'
require 'turbolinks'
require 'mini_magick'
require 'ancestry'
require 'breadcrumbs_on_rails'
require 'kaminari'
require 'mobility'
require 'rack-rewrite'
require 'jsonb_accessor'
require 'attr_json'

module Spina
  class Engine < ::Rails::Engine

    isolate_namespace Spina

    config.autoload_paths += %W( #{config.root}/lib )

    config.to_prepare do
      # Load helpers from main application
      Spina::ApplicationController.helper Rails.application.helpers
 
      # Require decorators from main application
      [Rails.root].flatten.map { |p| Dir[p.join('app', 'decorators', '**', '*_decorator.rb')]}.flatten.uniq.each do |decorator|
        Rails.configuration.cache_classes ? require(decorator) : load(decorator)
      end

      # Register JSON part types for editing content
      Spina::Part.register(
        Spina::Parts::Line, 
        Spina::Parts::Text, 
        Spina::Parts::Image, 
        Spina::Parts::ImageCollection, 
        Spina::Parts::Repeater, 
        Spina::Parts::Option, 
        Spina::Parts::Attachment
      )
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
spina-2.0.0.alpha lib/spina/engine.rb