私のRailsアプリケーションではroutes.rb、
match "show_fail" => "Posts#show_fail"
でposts_controller.rb:
def create
...
return redirect_to show_fail_path, :title => @post.title
end
def show_fail
end
でshow_fail.html.erb:
Unsuccessful posting of post title <%= title %>
しかし、エラーが発生しましundefined local variable or method 'title'た。なぜtitle変数について知らないのですか、どうすれば修正できますか?