<% content_for 'Navigation::Posts' do %> <%= content_tag :a, href: drafts_admin_posts_path do |a| %> <% if action_name.eql?('drafts') %> <% a.css << 'selected' %> <% end %> Drafts <% end %> <%= content_tag :a, href: published_admin_posts_path do |a| %> <% if action_name.eql?('published') %> <% a.css << 'selected' %> <% end %> Published <% end %> <%= link_to 'New Post', new_admin_post_path %> <% end %> <%= render('admin/navigation') %>
<%= form_for :posts, url: {controller: 'admin/posts', action: action_name}, method: 'GET', html: {class: %w(search), name: 'posts', id: 'PostsFilter', as: 'Posts.Filter'} do |f| %> <%= render('search') %> <% end %>