Sha256: 316730e1682f98ce0d657662f3bfd98c8169c6857566885587e26d832c01aaa2
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 KB
Contents
# encoding: utf-8 begin require 'active_support' rescue gem 'activesupport' require 'active_support' end begin require 'action_controller' rescue gem 'actionpack' require 'action_controller' end begin require 'action_view' rescue gem 'actionpack' require 'action_view' end require 'cells/cell' require 'cells/helpers' require 'cell' module Cells # Any config should be placed here using +mattr_accessor+. # Default view paths for Cells. DEFAULT_VIEW_PATHS = [ File.join('app', 'cells'), File.join('app', 'cells', 'layouts') ] class << self # Holds paths in which Cells should look for cell views (i.e. view template files). # # == Default: # # * +app/cells+ # * +app/cells/layouts+ # def self.view_paths ::Cell::Base.view_paths end def self.view_paths=(paths) ::Cell::Base.view_paths = paths end end # Cells setup/configuration helper for initializer. # # == Usage/Examples: # # Cells.setup do |config| # config.cell_view_paths << Rails.root.join('lib', 'cells') # end # def self.setup yield(self) end end Cell::Base.view_paths = Cells::DEFAULT_VIEW_PATHS if Cell::Base.view_paths.blank? require 'cells/rails' require 'cells/cell/test_case' if ENV['RAILS_ENV'] == 'test'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cells-3.3.10 | lib/cells.rb |
cells-3.3.9 | lib/cells.rb |