Module: Ecm::Core::ApplicationHelper

Defined in:
app/helpers/ecm/core/application_helper.rb

Instance Method Summary collapse

Instance Method Details

#bootstrap_paginate(objects, options = {}) ⇒ Object



4
5
6
7
8
# File 'app/helpers/ecm/core/application_helper.rb', line 4

def bootstrap_paginate(objects, options = {})
  options.reverse_merge!(theme: 'twitter-bootstrap-3')

  paginate(objects, options)
end

#mu(object, method) ⇒ Object



10
11
12
13
14
# File 'app/helpers/ecm/core/application_helper.rb', line 10

def mu(object, method)
  handler = object.send(method)
  erb_string = ::ERB.new(object[method.to_sym].to_s, 0).result(binding)
  handler.class.new(erb_string).to_html.html_safe
end