Commit ea27f5be314e8247d26dc93ffd4949a5c35818b6

Authored by Antonio Terceiro
1 parent 662babb3

Remove warning on trucate calls

Truncate now takes length and omission parameters in a options hash
Showing 2 changed files with 3 additions and 3 deletions   Show diff stats
app/models/article.rb
@@ -225,7 +225,7 @@ class Article < ActiveRecord::Base @@ -225,7 +225,7 @@ class Article < ActiveRecord::Base
225 225
226 include ActionView::Helpers::TextHelper 226 include ActionView::Helpers::TextHelper
227 def short_title 227 def short_title
228 - truncate self.title, 15, '...' 228 + truncate self.title, :length => 15, :omission => '...'
229 end 229 end
230 230
231 def belongs_to_blog? 231 def belongs_to_blog?
@@ -487,7 +487,7 @@ class Article < ActiveRecord::Base @@ -487,7 +487,7 @@ class Article < ActiveRecord::Base
487 end 487 end
488 488
489 def short_lead 489 def short_lead
490 - truncate sanitize_html(self.lead), 170, '...' 490 + truncate sanitize_html(self.lead), :length => 170, :omission => '...'
491 end 491 end
492 492
493 def creator 493 def creator
app/models/profile.rb
@@ -631,7 +631,7 @@ private :generate_url, :url_options @@ -631,7 +631,7 @@ private :generate_url, :url_options
631 include ActionView::Helpers::TextHelper 631 include ActionView::Helpers::TextHelper
632 def short_name(chars = 40) 632 def short_name(chars = 40)
633 if self[:nickname].blank? 633 if self[:nickname].blank?
634 - truncate self.name, chars, '...' 634 + truncate self.name, :length => chars, :omission => '...'
635 else 635 else
636 self[:nickname] 636 self[:nickname]
637 end 637 end