camaraderie
camaraderie copied to clipboard
acts_as_membership options
When we use acts_as_membership
we should be able to declare options that will be appended to the belongs_to
association. Like this example:
class Membership < ActiveRecord::Base
# Camaraderie
acts_as_membership
# NOTE: This association is defined by the `acts_as_membership` method above.
# However, we need to redefine it because we add `counter_cache`.
belongs_to :organization, class_name: Camaraderie.organization_class, inverse_of: :memberships, counter_cache: true
end