Sha256: e3a3ca44874517f38ec0661c32d43f816b3553f93313b2434aa6ef4d7d76ec47

Contents?: true

Size: 371 Bytes

Versions: 159

Compression:

Stored size: 371 Bytes

Contents

module AuxModel

  def add_newsitem item
    n = Newsitem.new
    case item.class.name
    when 'Video'
      n.video_id = item.id
    when 'Photo'
      raise 'Not Implemented'
    when 'Report'
      raise 'Not Implemented'
    when 'Gallery'
      raise 'Not Implmented'
    else
      raise 'Not Implemented'
    end
    self.newsitems << n
    self.save
  end

end

Version data entries

159 entries across 159 versions & 3 rubygems

Version Path
ish_models-0.0.33.71 lib/aux_model.rb
ish_models-0.0.33.70 lib/aux_model.rb
ish_models-0.0.33.69 lib/aux_model.rb
ish_models-0.0.33.68 lib/aux_model.rb
ish_models-0.0.33.67 lib/aux_model.rb
ish_models-0.0.33.66 lib/aux_model.rb
ish_models-0.0.33.65 lib/aux_model.rb
ish_models-0.0.33.64 lib/aux_model.rb
ish_models-0.0.33.63 lib/aux_model.rb
ish_models-0.0.33.62 lib/aux_model.rb
ish_models-0.0.33.61 lib/aux_model.rb
ish_models-0.0.33.60 lib/aux_model.rb
ish_models-0.0.33.59 lib/aux_model.rb
ish_models-0.0.33.58 lib/aux_model.rb
ish_models-0.0.33.57 lib/aux_model.rb
ish_models-0.0.33.56 lib/aux_model.rb
ish_models-0.0.33.55 lib/aux_model.rb
ish_models-0.0.33.54 lib/aux_model.rb
ish_models-0.0.33.53 lib/aux_model.rb
ish_models-0.0.33.52 lib/aux_model.rb