1
我在Rails中部分呈现时遇到了一些问题。Rails 3 - 呈现部分
这是我的routes.rb:
namespace :blog do
resources :posts, only: [:index, :show] do
resources :comments, only: [:new, :create]
end
end
这是我的博客:: PostsController:
def show
@post = Post.find(params[:id])
@comments = @post.comments
end
这是/views/blog/posts/show.html.erb
<%= render @comments %>
的_comment.html.erb部分是/视图/博客/留言/
的错误信息是:
Missing partial blog/comments/comment with {:locale=>[:en], :formats=>[:html], :handlers=>[:erb, :builder, :coffee]}. Searched in: * "/home/mar1221/ruby/my_site/app/views"