Took out a bunch of user.owner references
This commit is contained in:
parent
26abc68236
commit
3efa36587a
6 changed files with 11 additions and 23 deletions
|
|
@ -11,7 +11,6 @@ class PublicsController < ApplicationController
|
|||
end
|
||||
|
||||
def host_meta
|
||||
@user = User.owner
|
||||
render 'host_meta', :layout => false, :content_type => 'application/xrd+xml'
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@ module ApplicationHelper
|
|||
end
|
||||
|
||||
def owner_image_tag
|
||||
person_image_tag(User.owner)
|
||||
person_image_tag(current_user)
|
||||
end
|
||||
|
||||
def owner_image_link
|
||||
person_image_link(current_user)
|
||||
end
|
||||
|
||||
def person_image_tag(person)
|
||||
|
|
@ -46,10 +50,6 @@ module ApplicationHelper
|
|||
link_to person_image_tag(person), object_path(person)
|
||||
end
|
||||
|
||||
def owner_image_link
|
||||
person_image_link(User.owner)
|
||||
end
|
||||
|
||||
def new_request(request_count)
|
||||
"new_requests" if request_count > 0
|
||||
end
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@ class Blog < Post
|
|||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||
<title>#{self.title}</title>
|
||||
<content>#{self.body}</content>
|
||||
<link rel="alternate" type="text/html" href="#{User.owner.url}blogs/#{self.id}"/>
|
||||
<id>#{User.owner.url}blogs/#{self.id}</id>
|
||||
<link rel="alternate" type="text/html" href="#{person.url}blogs/#{self.id}"/>
|
||||
<id>#{person.url}blogs/#{self.id}</id>
|
||||
<published>#{self.created_at.xmlschema}</published>
|
||||
<updated>#{self.updated_at.xmlschema}</updated>
|
||||
</entry>
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ class Bookmark < Post
|
|||
<entry>
|
||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||
<title>#{self.title}</title>
|
||||
<link rel="alternate" type="text/html" href="#{User.owner.url}bookmarks/#{self.id}"/>
|
||||
<link rel="alternate" type="text/html" href="#{person.url}bookmarks/#{self.id}"/>
|
||||
<link rel="related" type="text/html" href="#{self.link}"/>
|
||||
<id>#{User.owner.url}bookmarks/#{self.id}</id>
|
||||
<id>#{person.url}bookmarks/#{self.id}</id>
|
||||
<published>#{self.created_at.xmlschema}</published>
|
||||
<updated>#{self.updated_at.xmlschema}</updated>
|
||||
</entry>
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ class StatusMessage < Post
|
|||
<entry>
|
||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||
<title>#{self.message}</title>
|
||||
<link rel="alternate" type="text/html" href="#{User.owner.url}status_messages/#{self.id}"/>
|
||||
<id>#{User.owner.url}status_messages/#{self.id}</id>
|
||||
<link rel="alternate" type="text/html" href="#{person.url}status_messages/#{self.id}"/>
|
||||
<id>#{person.url}status_messages/#{self.id}</id>
|
||||
<published>#{self.created_at.xmlschema}</published>
|
||||
<updated>#{self.updated_at.xmlschema}</updated>
|
||||
</entry>
|
||||
|
|
|
|||
|
|
@ -6,17 +6,6 @@ describe Post do
|
|||
@user.person.save
|
||||
end
|
||||
|
||||
describe 'defaults' do
|
||||
before do
|
||||
WebSocket.stub!(:update_clients)
|
||||
@post = Factory.create(:post, :person => nil)
|
||||
end
|
||||
|
||||
it "should associate the owner if none is present" do
|
||||
@post.person.should == User.owner
|
||||
end
|
||||
end
|
||||
|
||||
describe "newest" do
|
||||
before do
|
||||
@person_one = Factory.create(:person, :email => "some@dudes.com")
|
||||
|
|
|
|||
Loading…
Reference in a new issue