Skip to content

Instantly share code, notes, and snippets.

@sbounmy
Created October 13, 2011 18:56
Show Gist options
  • Save sbounmy/1285146 to your computer and use it in GitHub Desktop.
Save sbounmy/1285146 to your computer and use it in GitHub Desktop.
has_many :specialty_taggings
has_many :specialties, :through => :specialty_taggings, :source => :tag
has_many :notification_tags, :through => :specialty_taggings, :source => :tag
def notification_tags_with_all
all_notification_tags ? Tag.public.for_picker : notification_tags_without_all
end
class ActiveRecord::NamedScope::Scope
def loaded?
false
end
end
alias_method_chain :notification_tags, :all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment