module Cell::Prefixes::ClassMethods

You're free to override those methods in case you want to alter our view inheritance.

Public Instance Methods

prefixes() click to toggle source
# File lib/cell/prefixes.rb, line 12
def prefixes
  @prefixes ||= _prefixes
end

Private Instance Methods

_local_prefixes() click to toggle source
# File lib/cell/prefixes.rb, line 22
def _local_prefixes
  view_paths.collect { |path| "#{path}/#{controller_path}" }
end
_prefixes() click to toggle source
# File lib/cell/prefixes.rb, line 17
def _prefixes
  return [] if abstract?
  _local_prefixes + superclass.prefixes
end
inherit_views(parent) click to toggle source

Instructs Cells to inherit views from a parent cell without having to inherit class code.

Calls superclass method
# File lib/cell/prefixes.rb, line 27
def inherit_views(parent)
  define_method :_prefixes do
    super() + parent.prefixes
  end
end