module Rails module Service module AdminHelper def render_sidebar li = [] Rails::Service::AdminController.action_methods.sort.each do |method| text = method.split('_').map(&:capitalize).join(' ') li << content_tag(:li, link_to(text, admin_path(action: method)).html_safe) end content_tag(:ul, li.join.html_safe, class: 'nav nav-stacked') end def render_rails_iframe(opts = {}) attrs = { name: opts.fetch(:name), id: opts.fetch(:name), src: opts.fetch(:src), frameborder: '0', scrolling: 'no', onload: 'javascript:resizeIframe(this);', } content_tag(:iframe, nil, attrs) end end end end