资源多版本下载框样式修改
This commit is contained in:
parent
eeb9f8c78d
commit
10871c613d
|
|
@ -70,7 +70,20 @@ class BlogsController < ApplicationController
|
|||
:author_id=>params[:id])
|
||||
end
|
||||
def update
|
||||
|
||||
@blog = Blog.find(params[:id])
|
||||
@blog.update_attribute(:homepage_id, params[:article_id])
|
||||
redirect_to user_path(params[:user_id])
|
||||
end
|
||||
def new
|
||||
@blog = Blog.find(params[:id])
|
||||
@blog.update_attribute(:homepage_id, nil)
|
||||
redirect_to user_blogs_path(params[:user_id])
|
||||
end
|
||||
def show
|
||||
#如果某个user的blog不存在,那么就创建一条
|
||||
@blog = Blog.create(:name=>User.find(params[:id]).realname ,
|
||||
:description=>'',
|
||||
:author_id=>params[:id])
|
||||
end
|
||||
def destory
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue