i am getting the missing template error when i try to update my post.
Missing template posts/update, application/update with {:locale=>[:en],
:formats=>[:html], :variants=>[], :handlers=>[:erb, :builder, :raw,
:ruby, :coffee, :jbuilder]}. Searched in: *
“c:/Sites/myrubyblog/app/views”
EDIT.HTML.ERB
Edit Post
<%= form_for @post do |f| %>
<%= f.label :title %>
<%= f.text_field :title %>
<%= f.label :body %>
<%= f.text_area :body %>
<%= f.select :category_id, Category.all.collect {|x| [x.name,
x.id]}, {:include_blank => "Select One"} %>
<%= f.submit "Update Post" %>
<% end %>
<% link_to “Go Back”,post_path %>
POST_CONTROLLER.RB
class PostsController < ApplicationController
def index
@posts = Post.all
end
def show
@post = Post.find(params[:id])
end
def new
@post = Post.new
@category = Category.all
end
def create
@post = Post.new(post_params)
if @post.save
redirect_to posts_path, :notice => “Your post has been saved”
else
render “new”
end
end
def post_params
params.require(:post).permit(:category_id, :title, :body)
end
def edit
@post = Post.find(params[:id])
end
def update
end
def destroy
end
end