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
|
if @blog.created_at
|
||||||
flash[:notice] = "Successfully created blog."
|
flash[:notice] = "Successfully created blog."
|
||||||
redirect_to @blog
|
|
||||||
else
|
else
|
||||||
render :action => 'new'
|
render :action => 'new'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,6 @@ class BookmarksController < ApplicationController
|
||||||
|
|
||||||
if @bookmark.created_at
|
if @bookmark.created_at
|
||||||
flash[:notice] = "Successfully created bookmark."
|
flash[:notice] = "Successfully created bookmark."
|
||||||
redirect_to @bookmark
|
|
||||||
else
|
else
|
||||||
render :action => 'new'
|
render :action => 'new'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,6 @@ class PhotosController < ApplicationController
|
||||||
|
|
||||||
if @photo.created_at
|
if @photo.created_at
|
||||||
flash[:notice] = "Successfully uploaded photo."
|
flash[:notice] = "Successfully uploaded photo."
|
||||||
redirect_to @photo.album
|
|
||||||
else
|
else
|
||||||
render :action => 'album#new'
|
render :action => 'album#new'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
class StatusMessagesController < ApplicationController
|
class StatusMessagesController < ApplicationController
|
||||||
#before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@status_messages = StatusMessage.paginate :page => params[:page], :order => 'created_at DESC'
|
@status_messages = StatusMessage.paginate :page => params[:page], :order => 'created_at DESC'
|
||||||
|
|
@ -16,7 +16,6 @@ class StatusMessagesController < ApplicationController
|
||||||
|
|
||||||
if @status_message.created_at
|
if @status_message.created_at
|
||||||
flash[:notice] = "Successfully created status message."
|
flash[:notice] = "Successfully created status message."
|
||||||
redirect_to status_messages_url
|
|
||||||
else
|
else
|
||||||
render :action => 'new'
|
render :action => 'new'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -40,10 +40,11 @@ module Diaspora
|
||||||
|
|
||||||
def people_with_permissions
|
def people_with_permissions
|
||||||
begin
|
begin
|
||||||
friends = self.person.owner.friends
|
friends = self.person.owner.friends.all
|
||||||
|
Rails.logger.error("Dan is wrong!") if friends.nil?
|
||||||
friends ||= []
|
friends ||= []
|
||||||
rescue
|
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
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue