updated rails, and incorrect respond_to :location calls. you must supply an object with respond_with
This commit is contained in:
parent
c1bfbd358e
commit
ed0e739ac3
8 changed files with 49 additions and 50 deletions
2
Gemfile
2
Gemfile
|
|
@ -1,6 +1,6 @@
|
||||||
source 'http://rubygems.org'
|
source 'http://rubygems.org'
|
||||||
|
|
||||||
gem 'rails', '3.0.1'
|
gem 'rails', '3.0.3'
|
||||||
|
|
||||||
gem 'bundler', '>= 1.0.0'
|
gem 'bundler', '>= 1.0.0'
|
||||||
gem "chef", :require => false
|
gem "chef", :require => false
|
||||||
|
|
|
||||||
73
Gemfile.lock
73
Gemfile.lock
|
|
@ -83,35 +83,34 @@ GEM
|
||||||
specs:
|
specs:
|
||||||
SystemTimer (1.2.1)
|
SystemTimer (1.2.1)
|
||||||
abstract (1.0.0)
|
abstract (1.0.0)
|
||||||
actionmailer (3.0.1)
|
actionmailer (3.0.3)
|
||||||
actionpack (= 3.0.1)
|
actionpack (= 3.0.3)
|
||||||
mail (~> 2.2.5)
|
mail (~> 2.2.9)
|
||||||
actionpack (3.0.1)
|
actionpack (3.0.3)
|
||||||
activemodel (= 3.0.1)
|
activemodel (= 3.0.3)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.3)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
erubis (~> 2.6.6)
|
erubis (~> 2.6.6)
|
||||||
i18n (~> 0.4.1)
|
i18n (~> 0.4)
|
||||||
rack (~> 1.2.1)
|
rack (~> 1.2.1)
|
||||||
rack-mount (~> 0.6.12)
|
rack-mount (~> 0.6.13)
|
||||||
rack-test (~> 0.5.4)
|
rack-test (~> 0.5.6)
|
||||||
tzinfo (~> 0.3.23)
|
tzinfo (~> 0.3.23)
|
||||||
activemodel (3.0.1)
|
activemodel (3.0.3)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.3)
|
||||||
builder (~> 2.1.2)
|
builder (~> 2.1.2)
|
||||||
i18n (~> 0.4.1)
|
i18n (~> 0.4)
|
||||||
activerecord (3.0.1)
|
activerecord (3.0.3)
|
||||||
activemodel (= 3.0.1)
|
activemodel (= 3.0.3)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.3)
|
||||||
arel (~> 1.0.0)
|
arel (~> 2.0.2)
|
||||||
tzinfo (~> 0.3.23)
|
tzinfo (~> 0.3.23)
|
||||||
activeresource (3.0.1)
|
activeresource (3.0.3)
|
||||||
activemodel (= 3.0.1)
|
activemodel (= 3.0.3)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.3)
|
||||||
activesupport (3.0.1)
|
activesupport (3.0.3)
|
||||||
addressable (2.2.2)
|
addressable (2.2.2)
|
||||||
arel (1.0.1)
|
arel (2.0.6)
|
||||||
activesupport (~> 3.0.0)
|
|
||||||
aws (2.3.32)
|
aws (2.3.32)
|
||||||
activesupport
|
activesupport
|
||||||
http_connection
|
http_connection
|
||||||
|
|
@ -195,7 +194,7 @@ GEM
|
||||||
hashie (0.4.0)
|
hashie (0.4.0)
|
||||||
highline (1.6.1)
|
highline (1.6.1)
|
||||||
http_connection (1.4.0)
|
http_connection (1.4.0)
|
||||||
i18n (0.4.2)
|
i18n (0.5.0)
|
||||||
jammit (0.5.4)
|
jammit (0.5.4)
|
||||||
closure-compiler (>= 0.1.0)
|
closure-compiler (>= 0.1.0)
|
||||||
yui-compressor (>= 0.9.1)
|
yui-compressor (>= 0.9.1)
|
||||||
|
|
@ -288,19 +287,19 @@ GEM
|
||||||
ruby-openid (>= 2.1.8)
|
ruby-openid (>= 2.1.8)
|
||||||
rack-test (0.5.6)
|
rack-test (0.5.6)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
rails (3.0.1)
|
rails (3.0.3)
|
||||||
actionmailer (= 3.0.1)
|
actionmailer (= 3.0.3)
|
||||||
actionpack (= 3.0.1)
|
actionpack (= 3.0.3)
|
||||||
activerecord (= 3.0.1)
|
activerecord (= 3.0.3)
|
||||||
activeresource (= 3.0.1)
|
activeresource (= 3.0.3)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.3)
|
||||||
bundler (~> 1.0.0)
|
bundler (~> 1.0)
|
||||||
railties (= 3.0.1)
|
railties (= 3.0.3)
|
||||||
railties (3.0.1)
|
railties (3.0.3)
|
||||||
actionpack (= 3.0.1)
|
actionpack (= 3.0.3)
|
||||||
activesupport (= 3.0.1)
|
activesupport (= 3.0.3)
|
||||||
rake (>= 0.8.4)
|
rake (>= 0.8.7)
|
||||||
thor (~> 0.14.0)
|
thor (~> 0.14.4)
|
||||||
rake (0.8.7)
|
rake (0.8.7)
|
||||||
redis (2.1.1)
|
redis (2.1.1)
|
||||||
redis-namespace (0.8.0)
|
redis-namespace (0.8.0)
|
||||||
|
|
@ -408,7 +407,7 @@ DEPENDENCIES
|
||||||
nokogiri (= 1.4.3.1)
|
nokogiri (= 1.4.3.1)
|
||||||
omniauth (= 0.1.6)
|
omniauth (= 0.1.6)
|
||||||
pubsubhubbub
|
pubsubhubbub
|
||||||
rails (= 3.0.1)
|
rails (= 3.0.3)
|
||||||
resque
|
resque
|
||||||
rest-client
|
rest-client
|
||||||
roxml!
|
roxml!
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class PeopleController < ApplicationController
|
||||||
|
|
||||||
def destroy
|
def destroy
|
||||||
current_user.disconnect(current_user.visible_person_by_id(params[:id]))
|
current_user.disconnect(current_user.visible_person_by_id(params[:id]))
|
||||||
respond_with :location => root_url
|
redirect_to root_url
|
||||||
end
|
end
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
|
|
|
||||||
|
|
@ -65,20 +65,20 @@ class PhotosController < ApplicationController
|
||||||
format.json{ render(:layout => false , :json => {"success" => true, "data" => @photo}.to_json )}
|
format.json{ render(:layout => false , :json => {"success" => true, "data" => @photo}.to_json )}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
respond_with :location => photos_path, :error => message
|
respond_with @photo, :location => photos_path, :error => message
|
||||||
end
|
end
|
||||||
|
|
||||||
rescue TypeError
|
rescue TypeError
|
||||||
message = I18n.t 'photos.create.type_error'
|
message = I18n.t 'photos.create.type_error'
|
||||||
respond_with :location => photos_path, :error => message
|
respond_with @photo, :location => photos_path, :error => message
|
||||||
|
|
||||||
rescue CarrierWave::IntegrityError
|
rescue CarrierWave::IntegrityError
|
||||||
message = I18n.t 'photos.create.integrity_error'
|
message = I18n.t 'photos.create.integrity_error'
|
||||||
respond_with :location => photos_path, :error => message
|
respond_with @photo, :location => photos_path, :error => message
|
||||||
|
|
||||||
rescue RuntimeError => e
|
rescue RuntimeError => e
|
||||||
message = I18n.t 'photos.create.runtime_error'
|
message = I18n.t 'photos.create.runtime_error'
|
||||||
respond_with :location => photos_path, :error => message
|
respond_with @photo, :location => photos_path, :error => message
|
||||||
raise e
|
raise e
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -118,12 +118,12 @@ class PhotosController < ApplicationController
|
||||||
|
|
||||||
|
|
||||||
if photo.status_message_id
|
if photo.status_message_id
|
||||||
respond_with :location => photo.status_message
|
respond_with photo, :location => photo.status_message
|
||||||
else
|
else
|
||||||
respond_with :location => person_photos_path(current_user.person)
|
respond_with photo, :location => person_photos_path(current_user.person)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
respond_with :location => person_photos_path(current_user.person)
|
respond_with photo, :location => person_photos_path(current_user.person)
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -15,10 +15,10 @@ class RequestsController < ApplicationController
|
||||||
if params[:aspect_id]
|
if params[:aspect_id]
|
||||||
@contact = current_user.accept_and_respond( params[:id], params[:aspect_id])
|
@contact = current_user.accept_and_respond( params[:id], params[:aspect_id])
|
||||||
flash[:notice] = I18n.t 'requests.destroy.success'
|
flash[:notice] = I18n.t 'requests.destroy.success'
|
||||||
respond_with :location => current_user.aspect_by_id(params[:aspect_id])
|
respond_with @contact, :location => current_user.aspect_by_id(params[:aspect_id])
|
||||||
else
|
else
|
||||||
flash[:error] = I18n.t 'requests.destroy.error'
|
flash[:error] = I18n.t 'requests.destroy.error'
|
||||||
respond_with :location => requests_url
|
respond_with @contact, :location => requests_url
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
current_user.ignore_contact_request params[:id]
|
current_user.ignore_contact_request params[:id]
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,4 @@ class SocketsController < ApplicationController
|
||||||
@_request = ActionDispatch::Request.new({})
|
@_request = ActionDispatch::Request.new({})
|
||||||
Diaspora::WebSocket.queue_to_user(uid, action_hash(uid, object, opts))
|
Diaspora::WebSocket.queue_to_user(uid, action_hash(uid, object, opts))
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ describe PhotosController do
|
||||||
|
|
||||||
before do
|
before do
|
||||||
connect_users(user1, aspect1, user2, aspect2)
|
connect_users(user1, aspect1, user2, aspect2)
|
||||||
|
@controller.stub!(:current_user).and_return(user1)
|
||||||
sign_in :user, user1
|
sign_in :user, user1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ describe RequestsController do
|
||||||
render_views
|
render_views
|
||||||
before do
|
before do
|
||||||
@user = make_user
|
@user = make_user
|
||||||
|
@controller.stub!(:current_user).and_return(@user)
|
||||||
sign_in :user, @user
|
sign_in :user, @user
|
||||||
request.env["HTTP_REFERER"] = "http://test.host"
|
request.env["HTTP_REFERER"] = "http://test.host"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue