Merge branch 'response_picture'

This commit is contained in:
yafeilee 2014-05-26 20:31:55 +08:00
commit 24f72db77d
2 changed files with 10 additions and 2 deletions

View File

@ -49,7 +49,7 @@ class Admin::PostsController < ApplicationController
flash[:notice] = '创建博客成功'
redirect_to admin_posts_path
else
flash[:error] = '创建失败'
flash.now[:error] = '创建失败'
render :new
end
end

View File

@ -9,7 +9,15 @@ class PhotoUploader < CarrierWave::Uploader::Base
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
end
process :resize_to_limit => [680,nil]
process :resize_to_limit => [1200,nil]
version :medium do
process :resize_to_limit => [640,nil]
end
version :small do
process :resize_to_limit => [400,nil]
end
def extension_white_list
%w(jpg jpeg gif png)