学生匿评作业点击确定,页面没有刷新
This commit is contained in:
parent
94eef3cf19
commit
f8d82633c9
|
|
@ -32,6 +32,13 @@ class ArticleHomepagesController < ApplicationController
|
|||
end
|
||||
|
||||
def update
|
||||
if User.current.admin? || User.current.id == @article.user_id
|
||||
respond_to do |format|
|
||||
format.html { render :layout => 'static_base' }
|
||||
end
|
||||
else
|
||||
render_403
|
||||
end
|
||||
if User.current.logged?
|
||||
@article.title = params[:article_homepage][:title]
|
||||
@article.content = params[:article_homepage][:content]
|
||||
|
|
|
|||
Loading…
Reference in New Issue