Class: Markup::Rails::ApplicationViewHelper
- Inherits:
-
Rao::ViewHelper::Base
- Object
- Rao::ViewHelper::Base
- Markup::Rails::ApplicationViewHelper
- Defined in:
- app/view_helpers/markup/rails/application_view_helper.rb
Overview
Instance Method Summary collapse
-
#to_html(object, method) ⇒ Object
Example:.
Instance Method Details
#to_html(object, method) ⇒ Object
Example:
= markup_helper(self).to_html(post, :body)
13 14 15 16 17 18 |
# File 'app/view_helpers/markup/rails/application_view_helper.rb', line 13 def to_html(object, method) handler = object.send(method, :markup) return if handler.nil? erb_string = ::ERB.new(object[method.to_sym].to_s, 0).result(binding) handler.class.new(erb_string, handler.).to_html.html_safe end |