Sha256: 974cca8ae9af261b1857d4da8ff66dc34e509d3e615097870544b57f6fe5a918
Contents?: true
Size: 613 Bytes
Versions: 9
Compression:
Stored size: 613 Bytes
Contents
# This helper is a module that will get included into Rails via the # lib/navi/railtie class # # It allows us to be in the context of the controller it is being included # into: when this module is included to ActionView and the view/controller # calls the render method, "self" will refer to the view or controller # context module Navi module Helpers def self.included(base) #puts "Navi::Helpers was included into #{base}" end def navi_render(collection) renderer.render(collection) end private def renderer @renderer ||= Navi.renderer.new(self) end end end
Version data entries
9 entries across 9 versions & 1 rubygems