Module: Mack::ViewHelpers
- Defined in:
- lib/mack/view_helpers/all_helpers.rb,
lib/mack/view_helpers/form_helpers.rb,
lib/mack/view_helpers/html_helpers.rb,
lib/mack/view_helpers/link_helpers.rb,
lib/mack/view_helpers/object_helpers.rb,
lib/mack/view_helpers/string_helpers.rb,
lib/mack/view_helpers/date_time_helpers.rb
Overview
:nodoc:
Defined Under Namespace
Modules: FormHelpers, HtmlHelpers, LinkHelpers, ObjectHelpers, StringHelpers
Class Method Summary collapse
-
.included(base) ⇒ Object
Used to easily include all Mack::ViewHelpers.
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
Used to easily include all Mack::ViewHelpers. It will NOT include itself! This is primarily used to aid in testing view helpers.
13 14 15 16 17 18 19 20 |
# File 'lib/mack/view_helpers/all_helpers.rb', line 13 def self.included(base) base.class_eval do Mack::ViewHelpers.constants.each do |c| mod = "Mack::ViewHelpers::#{c}".constantize include mod unless base.is_a?(mod) end end # class_eval end |
Instance Method Details
#get_resource_root(resource) ⇒ Object
4 5 6 7 8 9 |
# File 'lib/mack/view_helpers/all_helpers.rb', line 4 def get_resource_root(resource) path = "" path = "#{configatron.mack.distributed.site_domain}" unless configatron.mack.distributed.site_domain.nil? path = Mack::Assets::Helpers.instance.asset_hosts(resource) if path.empty? return path end |