Module: LiquidExtensions::Helpers
- Included in:
- DmCore::LiquidBlock, DmCore::LiquidTag
- Defined in:
- lib/dm_core/liquid_extensions.rb
Instance Method Summary collapse
-
#context_account_site_assets(context) ⇒ Object
——————————————————————————.
-
#render_erb(context, file_name, locals = {}) ⇒ Object
So that tags can render Erb and have access to normal Rails helpers robots.thoughtbot.com/post/159806314/custom-tags-in-liquid ——————————————————————————.
Instance Method Details
#context_account_site_assets(context) ⇒ Object
56 57 58 |
# File 'lib/dm_core/liquid_extensions.rb', line 56 def context_account_site_assets(context) context.registers[:account_site_assets] end |
#render_erb(context, file_name, locals = {}) ⇒ Object
So that tags can render Erb and have access to normal Rails helpers robots.thoughtbot.com/post/159806314/custom-tags-in-liquid
51 52 53 |
# File 'lib/dm_core/liquid_extensions.rb', line 51 def render_erb(context, file_name, locals = {}) context.registers[:controller].send(:render_to_string, :partial => file_name, :locals => locals) end |