Module: Refinery::PageImages
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/refinery/page_images.rb,
lib/refinery/page_images/engine.rb,
lib/refinery/page_images/extension.rb,
lib/refinery/page_images/configuration.rb
Defined Under Namespace
Modules: Extension
Classes: Engine
Class Method Summary
collapse
Class Method Details
.attach! ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/refinery/page_images.rb', line 17
def attach!
require 'refinery/page'
require 'refinery/page_images/extension'
config.enabled_models.each do |model_class_name|
unless (model_class = model_class_name.safe_constantize)
Rails.logger.warn "PageImages is unable to find model class: #{model_class_name}"
next
end
model_class.send :has_many_page_images
end
Refinery::Image.send :has_many, :image_pages, :dependent => :destroy
end
|
.factory_paths ⇒ Object
13
14
15
|
# File 'lib/refinery/page_images.rb', line 13
def factory_paths
@factory_paths ||= [ root.join('spec', 'factories').to_s ]
end
|
.root ⇒ Object
9
10
11
|
# File 'lib/refinery/page_images.rb', line 9
def root
@root ||= Pathname.new(File.expand_path('../../../', __FILE__))
end
|