Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.get_article(key)
- Article.find :conditions => ["key = ?", key], :joins => :article_versions
- end
- class << self
- def get_article(key)
- find :conditions => {:key => key}, :joins => :article_versions
- end
- end
- named_scope :get_article, lambda {|key| find :conditions => {:key => key}, :joins => :article_versions }
Add Comment
Please, Sign In to add comment