Rails newbie here. I'm trying to implement a basic search function in my app and I'm not having any luck getting the search results to render in my partial. I've looked online at rails guides, scoured the forums here, experimented with various tutorials with little success. 

As I mentioned, Rails newbie here, so I'm sure my code is probably pretty ugly. Any hints on how to follow proper etiquette will be greatly appreciated. :)

Post Controller

```
def index
  @posts = Post.ransack(params[:query], load:true).result
end

def show
  @post = Post.friendly.find(params[:id])
end

def post_params
  params.require(:post).permit(:title, :body, :image, :slug)
end

def search_params
  params.permit(:search_title, :search_body)
end

```

routes.rb

```
 Rails.application.routes.draw do
 devise_for :admin_users, ActiveAdmin::Devise.config
 ActiveAdmin.routes(self)

 resources :posts

 root to: 'posts#index', as: :home

```

Post Model

```
 belongs_to :category

 extend FriendlyId
  friendly_id :title, :use => [:slugged, :finders]

  validates :title, presence: true, length: { minimum: 5 }
  validates :body, presence: true
  validates :image, presence: true

 def self.search_posts(search)
  if search
   where(["title LIKE ?","%#{search}%"])
  else
   all
  end
 end
end

```

app/views/posts/index.html.erb

```
 <%= form_tag posts_path, :method => 'get' do %>
  <%= text_field_tag :search, params[:search], placeholder: "Search Posts" %>
  <%= submit_tag "Search" %>
  <% if @posts.present? %>
  <%= render 'posts/show' %>
  <% else %>
  <p>We cannot find posts containing the term(s) <%= params[:search] %>. Please try again.</p>
 <% end %>

```

Gemfile

```
gem 'activeadmin'
gem 'kaminari'
gem 'friendly_id'

```

I believe that's all the relevant code. Please let me know if you need anything additional. 

As you can see I add Posts via activeadmin so I'm not sure if that has any impact on this. Everything works normally and I get the checkmark in the url which I believe is telling me that it found a match but I'm trying to have it go to my show partial in the posts view but nothing happens.

Edit: Thanks for all of your responses. I tried each one but without success. However I believe that the issue is bigger than simply learning the ins and outs of a gem. I need to take some online classes to bone up more on the fundamentals. I will leave this post open and add a working solution to help out others once I've got a better handle on the basics. Thanks again all! :)

Edit\_2: Answer is posted below.