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
|
end
|
||||||
|
|
||||||
def host_meta
|
def host_meta
|
||||||
@user = User.owner
|
|
||||||
render 'host_meta', :layout => false, :content_type => 'application/xrd+xml'
|
render 'host_meta', :layout => false, :content_type => 'application/xrd+xml'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,11 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def owner_image_tag
|
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
|
end
|
||||||
|
|
||||||
def person_image_tag(person)
|
def person_image_tag(person)
|
||||||
|
|
@ -46,10 +50,6 @@ module ApplicationHelper
|
||||||
link_to person_image_tag(person), object_path(person)
|
link_to person_image_tag(person), object_path(person)
|
||||||
end
|
end
|
||||||
|
|
||||||
def owner_image_link
|
|
||||||
person_image_link(User.owner)
|
|
||||||
end
|
|
||||||
|
|
||||||
def new_request(request_count)
|
def new_request(request_count)
|
||||||
"new_requests" if request_count > 0
|
"new_requests" if request_count > 0
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -15,8 +15,8 @@ class Blog < Post
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
<title>#{self.title}</title>
|
<title>#{self.title}</title>
|
||||||
<content>#{self.body}</content>
|
<content>#{self.body}</content>
|
||||||
<link rel="alternate" type="text/html" href="#{User.owner.url}blogs/#{self.id}"/>
|
<link rel="alternate" type="text/html" href="#{person.url}blogs/#{self.id}"/>
|
||||||
<id>#{User.owner.url}blogs/#{self.id}</id>
|
<id>#{person.url}blogs/#{self.id}</id>
|
||||||
<published>#{self.created_at.xmlschema}</published>
|
<published>#{self.created_at.xmlschema}</published>
|
||||||
<updated>#{self.updated_at.xmlschema}</updated>
|
<updated>#{self.updated_at.xmlschema}</updated>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,9 @@ class Bookmark < Post
|
||||||
<entry>
|
<entry>
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
<title>#{self.title}</title>
|
<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}"/>
|
<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>
|
<published>#{self.created_at.xmlschema}</published>
|
||||||
<updated>#{self.updated_at.xmlschema}</updated>
|
<updated>#{self.updated_at.xmlschema}</updated>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ class StatusMessage < Post
|
||||||
<entry>
|
<entry>
|
||||||
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
<activity:verb>http://activitystrea.ms/schema/1.0/post</activity:verb>
|
||||||
<title>#{self.message}</title>
|
<title>#{self.message}</title>
|
||||||
<link rel="alternate" type="text/html" href="#{User.owner.url}status_messages/#{self.id}"/>
|
<link rel="alternate" type="text/html" href="#{person.url}status_messages/#{self.id}"/>
|
||||||
<id>#{User.owner.url}status_messages/#{self.id}</id>
|
<id>#{person.url}status_messages/#{self.id}</id>
|
||||||
<published>#{self.created_at.xmlschema}</published>
|
<published>#{self.created_at.xmlschema}</published>
|
||||||
<updated>#{self.updated_at.xmlschema}</updated>
|
<updated>#{self.updated_at.xmlschema}</updated>
|
||||||
</entry>
|
</entry>
|
||||||
|
|
|
||||||
|
|
@ -6,17 +6,6 @@ describe Post do
|
||||||
@user.person.save
|
@user.person.save
|
||||||
end
|
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
|
describe "newest" do
|
||||||
before do
|
before do
|
||||||
@person_one = Factory.create(:person, :email => "some@dudes.com")
|
@person_one = Factory.create(:person, :email => "some@dudes.com")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue