Changeset 1667

Show
Ignore:
Timestamp:
02/28/08 09:10:30 (3 months ago)
Author:
pdcawley
Message:

Fixed a couple of helper methods on the blog. Should probably change the call sites eventually

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/app/models/blog.rb

    r1665 r1667  
    179179  def find_already_published(content_type)  # :nodoc: 
    180180    typo_deprecated "Use #{content_type}.find_already_published" 
    181     self.send(content_type).find_already_published 
     181    content_type.to_s.camelize.constantize.find_already_published 
    182182  end 
    183183 
     
    188188 
    189189  def requested_article(params) 
    190     published_articles.find_by_params_hash(params) 
     190    Article.find_by_params_hash(params) 
    191191  end 
    192192 
    193193  def requested_articles(params) 
    194     published_articles.find_all_by_date(*params.values_at(:year, :month, :day)) 
     194    Article.find_all_by_date(*params.values_at(:year, :month, :day)) 
    195195  end 
    196196 
    197197  def articles_matching(query) 
    198     published_articles.search(query) 
     198    Article.search(query) 
    199199  end 
    200200