Reputation: 2584
hy i'm trying to use this gem to generate a responsive nar_bar. it work fine for me:
<%= nav_bar fixed: :top , brand: "Some_brand" , :responsive => true do %>
<%= menu_group pull: :right do %>
<%= drop_down "Services" do %>
<%= menu_item "a",a_path %>
<%= menu_item "b",b_path %>
<%= drop_down_divider %>
<%= menu_item "c",c_path %>
<% end %>
<%= menu_item "About",about_path %>
<%= menu_item "Portfolio",portfolio_path %>
<% end %>
now i want to use a logo.jpg image in brand instead "Some brand". Something like this:
<%= nav_bar fixed: :top , brand: :image_tag('logo.jpg') , :responsive => true do %>
i don't know if the helper method work whit image_tag. Can you help me?
Upvotes: 1
Views: 484
Reputation: 8574
I'm not entirely sure if this will work or not, but the code you showed definitely has an issue. Including the :
before image_tag
is telling Rails that image_tag
is a symbol and not a method. You might try removing the extra colon.
<%= nav_bar fixed: :top , brand: image_tag('logo.jpg') , :responsive => true do %>
Upvotes: 1