parent
4036a572af
commit
521468986f
4 changed files with 1 additions and 15 deletions
1
Gemfile
1
Gemfile
|
|
@ -77,7 +77,6 @@ gem "activerecord-import", "0.15.0"
|
||||||
gem "carrierwave", "0.11.2"
|
gem "carrierwave", "0.11.2"
|
||||||
gem "fog", "1.38.0"
|
gem "fog", "1.38.0"
|
||||||
gem "mini_magick", "4.5.1"
|
gem "mini_magick", "4.5.1"
|
||||||
gem "remotipart", "1.2.1"
|
|
||||||
|
|
||||||
# GUID generation
|
# GUID generation
|
||||||
gem "uuid", "2.3.8"
|
gem "uuid", "2.3.8"
|
||||||
|
|
|
||||||
|
|
@ -1019,7 +1019,6 @@ DEPENDENCIES
|
||||||
rb-fsevent (= 0.9.7)
|
rb-fsevent (= 0.9.7)
|
||||||
rb-inotify (= 0.9.7)
|
rb-inotify (= 0.9.7)
|
||||||
redcarpet (= 3.3.4)
|
redcarpet (= 3.3.4)
|
||||||
remotipart (= 1.2.1)
|
|
||||||
responders (= 2.2.0)
|
responders (= 2.2.0)
|
||||||
rspec-rails (= 3.5.1)
|
rspec-rails (= 3.5.1)
|
||||||
rubocop (= 0.40.0)
|
rubocop (= 0.40.0)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@
|
||||||
//= require js-routes
|
//= require js-routes
|
||||||
//= require underscore
|
//= require underscore
|
||||||
//= require backbone
|
//= require backbone
|
||||||
//= require jquery.remotipart
|
|
||||||
//= require autosize
|
//= require autosize
|
||||||
//= require charcount
|
//= require charcount
|
||||||
//= require jquery-placeholder
|
//= require jquery-placeholder
|
||||||
|
|
|
||||||
|
|
@ -43,20 +43,9 @@ class PhotosController < ApplicationController
|
||||||
|
|
||||||
def create
|
def create
|
||||||
rescuing_photo_errors do
|
rescuing_photo_errors do
|
||||||
if remotipart_submitted?
|
|
||||||
@photo = current_user.build_post(:photo, photo_params)
|
|
||||||
if @photo.save
|
|
||||||
respond_to do |format|
|
|
||||||
format.json { render :json => {"success" => true, "data" => @photo.as_api_response(:backbone)} }
|
|
||||||
end
|
|
||||||
else
|
|
||||||
respond_with @photo, :location => photos_path, :error => message
|
|
||||||
end
|
|
||||||
else
|
|
||||||
legacy_create
|
legacy_create
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
|
|
||||||
def make_profile_photo
|
def make_profile_photo
|
||||||
author_id = current_user.person_id
|
author_id = current_user.person_id
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue