I was making a blog and I've got problem when I want to show an article

I've generate scaffold article title content:text and I just generate new controller called **welcome** with a view called **homepage**. I created new controller+view just to show articles. for this part I did not find the problem and then I created a new controller called **post** with a view called **show** is intended only to show the contents of the selected articles from the **homepage**. 

how to show article's content from another view ?
I just added `@article = Article.find(params[:id])` to post\_controller
and then when I click an article's title in **homepage** I got error like this

> 
> Couldn't find Article with 'id'=
> 
> 
> 

did I miss some code?

so this is my **welcome\_controller**

```
class WelcomeController < ApplicationController
  def homepage
    @articles = Article.all
  end
end

```

**welcome/homepage.html.erb**

```
<div class="post-preview">
   <% @articles.each do |article|%>
     <h2 class="post-title"><%= link_to article.title, welcome_show_path %></h2>                    
     <%= truncate article.content, length: 160 %>
     <hr>
   <% end %>    
</div>

```

**post/show.html.erb**

```
<div class="post-heading">
   <h1><%= @article.title %></h1>
</div>
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
   <p><%= @article.content %></p>
</div>

```

**post\_controller**

```
class PostController < ApplicationController
  def show
    @article = Article.find(params[:id])
  end
end

```

**routes.rb**

```
Rails.application.routes.draw do
  resources :articles
  get 'welcome/homepage'
  get 'post', to: 'post#show'
  root 'welcome#homepage'
end

```

thanks :)