Took out create redirects on ajaxy things, authenticating statusmessages

This commit is contained in:
Raphael 2010-08-11 10:52:01 -07:00
parent 355aba75df
commit 683bb0dbef
5 changed files with 4 additions and 7 deletions

View file

@ -24,7 +24,6 @@ class BlogsController < ApplicationController
if @blog.created_at
flash[:notice] = "Successfully created blog."
redirect_to @blog
else
render :action => 'new'
end

View file

@ -34,7 +34,6 @@ class BookmarksController < ApplicationController
if @bookmark.created_at
flash[:notice] = "Successfully created bookmark."
redirect_to @bookmark
else
render :action => 'new'
end

View file

@ -7,7 +7,6 @@ class PhotosController < ApplicationController
if @photo.created_at
flash[:notice] = "Successfully uploaded photo."
redirect_to @photo.album
else
render :action => 'album#new'
end

View file

@ -1,5 +1,5 @@
class StatusMessagesController < ApplicationController
#before_filter :authenticate_user!
before_filter :authenticate_user!
def index
@status_messages = StatusMessage.paginate :page => params[:page], :order => 'created_at DESC'
@ -16,7 +16,6 @@ class StatusMessagesController < ApplicationController
if @status_message.created_at
flash[:notice] = "Successfully created status message."
redirect_to status_messages_url
else
render :action => 'new'
end

View file

@ -40,10 +40,11 @@ module Diaspora
def people_with_permissions
begin
friends = self.person.owner.friends
friends = self.person.owner.friends.all
Rails.logger.error("Dan is wrong!") if friends.nil?
friends ||= []
rescue
Rails.logger.fatal("IOUASDVJOISDNVPOIJSDVOUIDSGPUOID")
Rails.logger.fatal("Called people_with_permissions on a post from a remote user. We need to implement this shit.")
[]
end
end