Sha256: d325844f272474718261965d172743959db4b456982845849321040f56749c59
Contents?: true
Size: 760 Bytes
Versions: 1
Compression:
Stored size: 760 Bytes
Contents
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
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-service-0.1.0 | app/helpers/rails/service/admin_helper.rb |