html - Button not linking properly -


for reason button not linking correctly. please show me im doing wrong?

<div class="btn-group">    <button type="button" class="<%= @most_popular %> btn btn-default"><%= link_to "most popular", posts_path %></button> </div> 

link_to creates anchor tag. reference.

nesting anchor tag inside button not correct html afaik. if want link button can try this. bootstrap happily accepts button classes on anchor tags.

<%= link_to 'most popular', posts_path, :class => "btn btn-default #{@most_popular}" %> 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

StringGrid issue in Delphi XE8 firemonkey mobile app -