Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Replace string interpolation with rails helpers.

  • Loading branch information...
commit ef27f7897089afcd169bd4a16e643db94d073f22 1 parent 14bd678
@gunn authored
Showing with 4 additions and 5 deletions.
  1. +4 −5 app/helpers/rails_admin/application_helper.rb
View
9 app/helpers/rails_admin/application_helper.rb
@@ -72,11 +72,10 @@ def navigation nodes_stack, nodes, level=0
url = url_for(:action => :index, :controller => 'rails_admin/main', :model_name => model_param)
level_class = "nav-level-#{level}" if level > 0
- %{<li data-model="#{model_param}">
- <a class="pjax#{level_class}" href="#{url}">#{node.label_plural}</a>
- </li>
- #{navigation(nodes_stack, nodes_stack.select{ |n| n.parent.to_s == node.abstract_model.model_name}, level + 1)}
- }
+ li = content_tag :li, "data-model"=>model_param do
+ link_to node.label_plural, url, :class => "pjax#{level_class}"
+ end
+ li + navigation(nodes_stack, nodes_stack.select{ |n| n.parent.to_s == node.abstract_model.model_name}, level+1)
end.join
end
Please sign in to comment.
Something went wrong with that request. Please try again.