Last active
October 31, 2017 15:55
-
-
Save domagude/9a311069e6a7a0eaa8cefb4f11b82748 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% branch_path_name = "#{params[:action]}_posts_path" %> | |
<div class="col-sm-12"> | |
<ul class="categories-list"> | |
<%= render all_categories_button_partial_path, | |
branch_path_name: branch_path_name %> | |
<% @categories.each do |category| %> | |
<li class="category-item"> | |
<%= link_to category.name, | |
send(branch_path_name, category: category.name), | |
:class => ("selected-item" if params[:category] == category.name) %> | |
</li> | |
<% end %> | |
</ul> | |
</div><!-- col-sm-12 --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment