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