Skip to content

Commit

Permalink
Remove some unused methods.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvz committed Feb 18, 2012
1 parent d7f8b19 commit 7211858
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
13 changes: 0 additions & 13 deletions app/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,6 @@ def default_text_filter
blog.comment_text_filter.to_text_filter
end

def rss_author(xml)
end

def rss_title(xml)
xml.title feed_title
end

def feed_title
"Comment on #{article.title} by #{author}"
end
Expand All @@ -51,12 +44,6 @@ def originator
author
end

def additional_akismet_options
{ :user_agent => user_agent,
:referrer => referrer,
:permalink => permalink }
end

def content_fields
[:body]
end
Expand Down
9 changes: 0 additions & 9 deletions app/models/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,6 @@ def self.find_by_published_at
super(:created_at)
end


def edit_url
blog.url_for(:controller => "/admin/pages", :action =>"edit", :id => id)
end

def delete_url
blog.url_for(:controller => "/admin/pages", :action =>"destroy", :id => id)
end

def satanized_title
remove_accents(self.title).gsub(/<[^>]*>/, '').to_url
end
Expand Down
14 changes: 0 additions & 14 deletions spec/models/page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,6 @@
it { should == 'http://myblog.net/pages/page_one' }
end

describe "url" do
before do
@base_url = 'http://myblog.net/admin/pages/'
end

it '#edit_url should be: http://myblog.net/admin/pages/edit/<page_id>' do
@page.edit_url.should == "#{@base_url}edit/#{@page.id}"
end

it '#delete_url should work too' do
@page.delete_url.should == "#{@base_url}destroy/#{@page.id}"
end
end

it 'Pages cannot have the same name' do
Page.new(:name => @page.name, :body => @page.body, :title => @page.title).should_not be_valid
Page.new(:name => @page.name, :body => 'body', :title => 'title').should_not be_valid
Expand Down

0 comments on commit 7211858

Please sign in to comment.