Skip to content

Commit

Permalink
Removed need for market segment.
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Youch committed May 25, 2010
1 parent e09e47f commit d2af02d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/models/user_subscription.rb
Expand Up @@ -3,8 +3,6 @@
class UserSubscription < DomainModel
validates_presence_of :name

has_one :market_segment, :dependent => :destroy

has_many :user_subscription_entries, :dependent => :delete_all, :include => :end_user

has_many :active_subscriptions, :class_name => 'UserSubscriptionEntry', :conditions => 'verified = 1 AND subscribed=1'
Expand All @@ -17,13 +15,6 @@ def after_create #:nodoc:all
segment.refresh
end

def after_update #:nodoc:all
if self.market_segment
self.market_segment.name = 'Subscribers to '.t + self.name
self.market_segment.save
end
end

# Subscribe a user via a admin subscription
def admin_subscribe_user(user,options={})
self.user_subscription_entries.find_by_end_user_id(user.id) ||
Expand Down

0 comments on commit d2af02d

Please sign in to comment.