parent
eaf4ad354f
commit
69bc26033e
|
@ -28,7 +28,11 @@ class BlogsController < ApplicationController
|
|||
end
|
||||
private
|
||||
def find_blog
|
||||
@blog = Blog.find(params[:blog_id])
|
||||
if params[:blog_id]
|
||||
@blog = Blog.find(params[:blog_id])
|
||||
else
|
||||
render_404
|
||||
end
|
||||
if @blog.nil?
|
||||
#如果某个user的blog不存在,那么就创建一条
|
||||
@blog = Blog.create(:name=>User.find(params[:id]).realname ,
|
||||
|
|
|
@ -40,8 +40,8 @@ function regexTopicDescription()
|
|||
$("#message_content_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
else if(name.length >=6000){
|
||||
$("#message_content_span").text("描述最多3000个汉字(或6000个英文字符)");
|
||||
else if(name.length >=20000){
|
||||
$("#message_content_span").text("描述最多20000个汉字(或40000个英文字符)");
|
||||
$("#message_content_span").css('color','#ff0000');
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue