Took out create redirects on ajaxy things, authenticating statusmessages
This commit is contained in:
parent
355aba75df
commit
683bb0dbef
5 changed files with 4 additions and 7 deletions
|
|
@ -24,7 +24,6 @@ class BlogsController < ApplicationController
|
|||
|
||||
if @blog.created_at
|
||||
flash[:notice] = "Successfully created blog."
|
||||
redirect_to @blog
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,6 @@ class BookmarksController < ApplicationController
|
|||
|
||||
if @bookmark.created_at
|
||||
flash[:notice] = "Successfully created bookmark."
|
||||
redirect_to @bookmark
|
||||
else
|
||||
render :action => 'new'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue