Sha256: 101257c76121a377eee22f65186cc72350e9c942e51a36e9bb1755b1d588a535

Contents?: true

Size: 662 Bytes

Versions: 3

Compression:

Stored size: 662 Bytes

Contents

class SeriesStatementMergeList < ActiveRecord::Base
  has_many :series_statement_merges, :dependent => :destroy
  has_many :series_statements, :through => :series_statement_merges
  validates_presence_of :title

  def self.per_page
    10
  end

  def merge_series_statements(selected_series_statement)
    self.series_statements.each do |series_statement|
      series_statement.destroy unless series_statement == selected_series_statement
    end
  end
end

# == Schema Information
#
# Table name: series_statement_merge_lists
#
#  id         :integer         not null, primary key
#  title      :string(255)
#  created_at :datetime
#  updated_at :datetime
#

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
enju_resource_merge-0.0.4 app/models/series_statement_merge_list.rb
enju_resource_merge-0.0.3 app/models/series_statement_merge_list.rb
enju_resource_merge-0.0.2 app/models/series_statement_merge_list.rb