Skip to content

Commit

Permalink
Force categories to use to_permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric de Villamil committed Mar 5, 2012
1 parent 4c59f99 commit 7db1582
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,6 @@ def self.reorder_alpha
reorder send(:with_exclusive_scope){find(:all, :order => 'UPPER(name)').collect { |c| c.id }}
end

def stripped_name
self.name.to_url
end

def published_articles
articles.already_published
end
Expand Down Expand Up @@ -82,7 +78,7 @@ def to_param
before_save :set_defaults

def set_defaults
self.permalink ||= self.stripped_name
self.permalink ||= self.name.to_permalink
end

validates_presence_of :name
Expand Down

0 comments on commit 7db1582

Please sign in to comment.