From cc17695d0315daf38a5d6afe5b8c1773e2ad1740 Mon Sep 17 00:00:00 2001 From: Yuriy Volkov Date: Sun, 18 Apr 2010 12:06:02 +0300 Subject: [PATCH] add business and private named scopes --- appoyo/app/models/fbgallery.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/appoyo/app/models/fbgallery.rb b/appoyo/app/models/fbgallery.rb index d60a3ca..81395fc 100644 --- a/appoyo/app/models/fbgallery.rb +++ b/appoyo/app/models/fbgallery.rb @@ -3,6 +3,9 @@ class Fbgallery < ActiveRecord::Base has_many :fbvotes acts_as_taggable + named_scope :all_business, :conditions => ["gallery_type = #{Business_3drotate} or gallery_type = #{Business_Gallery}"] + named_scope :all_private, :conditions => ["gallery_type = #{Private_3drotate} or gallery_type = #{Private_Gallery}"] + Category = { 0 => 'Private', 1 => 'Business' -- 2.11.4.GIT