Module: Workarea::PluginsHelper
- Defined in:
- app/helpers/workarea/plugins_helper.rb
Instance Method Summary collapse
Instance Method Details
#append_partials(name, locals = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/helpers/workarea/plugins_helper.rb', line 3 def append_partials(name, locals = {}) appends = Plugin.skip_appends( Plugin.partials_appends[name], Workarea.config.skip_partials ) return if appends.blank? appends.inject([]) do |arr, paths| Array(paths).each do |path| arr << render(partial: path, locals: locals) end arr end.join("\n").html_safe end |
#partials_to_append?(name) ⇒ Boolean
19 20 21 |
# File 'app/helpers/workarea/plugins_helper.rb', line 19 def partials_to_append?(name) Plugin.partials_appends[name].present? end |