Sha256: 29f366ce5ff9dd1cd1375ce7cd08697ff2d9b639f17ce751720c190f6c405491
Contents?: true
Size: 1007 Bytes
Versions: 2
Compression:
Stored size: 1007 Bytes
Contents
# == Schema Information # # Table name: aggregations # # id :integer(4) not null, primary key # name :string(255) # title :string(255) # description :text # top_tags :text # created_at :datetime # updated_at :datetime # ownable_id :integer(4) # ownable_type :string(255) # class Aggregation < ActiveRecord::Base unloadable belongs_to :ownable, :polymorphic => true has_many :aggregation_feeds has_many :feeds, :through => :aggregation_feeds # ########################################################## # # adds a feed to an aggregation and saves the feed # def add_feed_to_aggregation(aggregation, feed) # if aggregation.feeds.include?(feed) # self.already_feeds.push(feed) # else # if feed.save # have to save here so that feed has an id. Without id can't associate with aggregation # feed.aggregations << aggregation # self.added_feeds.push(feed ) # end # end # feed.save # end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
muck-raker-0.1.32 | app/models/aggregation.rb |
muck-raker-0.1.33 | app/models/aggregation.rb |