Sha256: 0ea286a05c8507641e51677505614b26c6fabfe0dc8164e534461ce279567fbd
Contents?: true
Size: 949 Bytes
Versions: 1
Compression:
Stored size: 949 Bytes
Contents
require "action_view" require "action_controller" module Blocks autoload :Base, "blocks/base" autoload :Container, "blocks/container" autoload :ViewAdditions, "blocks/view_additions" autoload :ControllerAdditions, "blocks/controller_additions" mattr_accessor :template_folder @@template_folder = "blocks" mattr_accessor :use_partials @@use_partials = false mattr_accessor :surrounding_tag_surrounds_before_and_after_blocks @@surrounding_tag_surrounds_before_and_after_blocks = false # Shortcut for using the templating feature / rendering templates def self.render_template(view, partial, options={}, &block) Blocks::Base.new(view, options).render_template(partial, &block) end # Default way to setup Blocks def self.setup yield self end end ActionView::Base.send :include, Blocks::ViewAdditions::ClassMethods ActionController::Base.send :include, Blocks::ControllerAdditions::ClassMethods
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
blocks-2.1.0 | lib/blocks.rb |