不能删除帖子问题

This commit is contained in:
yanxd 2014-05-04 18:49:56 +08:00
parent 374b183c0f
commit 2b5cdf161c
2 changed files with 4 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,3 +1,4 @@
*.swp
/.project /.project
/.idea /.idea
/.bundle /.bundle
@ -11,4 +12,4 @@
/Gemfile /Gemfile
/Gemfile.lock /Gemfile.lock
/db/schema.rb /db/schema.rb
/Gemfile.lock /Gemfile.lock

View File

@ -148,7 +148,8 @@ class MemosController < ApplicationController
def find_memo def find_memo
return unless find_forum return unless find_forum
@memo = @forum.memos.find(params[:id]) #@memo = @forum.memos.find(params[:id])
@memo = Memo.find(params[:id])
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
render_404 render_404
nil nil