add frendly urls for debates and proposals
This commit is contained in:
@@ -54,6 +54,10 @@ class Debate < ActiveRecord::Base
|
||||
order_within_rank: "debates.cached_votes_up DESC"
|
||||
}
|
||||
|
||||
def to_param
|
||||
"#{id}-#{title}".parameterize
|
||||
end
|
||||
|
||||
def description
|
||||
super.try :html_safe
|
||||
end
|
||||
|
||||
@@ -59,6 +59,10 @@ class Proposal < ActiveRecord::Base
|
||||
order_within_rank: "proposals.cached_votes_up DESC"
|
||||
}
|
||||
|
||||
def to_param
|
||||
"#{id}-#{title}".parameterize
|
||||
end
|
||||
|
||||
def searchable_values
|
||||
values = {
|
||||
title => 'A',
|
||||
|
||||
Reference in New Issue
Block a user