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.163 lib/aux_model.rb
ish_models-0.0.33.162 lib/aux_model.rb
ish_models-0.0.33.161 lib/aux_model.rb
ish_models-0.0.33.160 lib/aux_model.rb
ish_models-0.0.33.159 lib/aux_model.rb
ish_models-0.0.33.158 lib/aux_model.rb
ish_models-0.0.33.157 lib/aux_model.rb
ish_models-0.0.33.156 lib/aux_model.rb
ish_models-0.0.33.154 lib/aux_model.rb
ish_models-0.0.33.153 lib/aux_model.rb
ish_models-0.0.33.152 lib/aux_model.rb
ish_models-0.0.33.151 lib/aux_model.rb
ish_models-0.0.33.150 lib/aux_model.rb
ish_models-0.0.33.149 lib/aux_model.rb
ish_models-0.0.33.148 lib/aux_model.rb
ish_models-0.0.33.147 lib/aux_model.rb
ish_models-0.0.33.146 lib/aux_model.rb
ish_models-0.0.33.145 lib/aux_model.rb
ish_models-0.0.33.144 lib/aux_model.rb
ish_models-0.0.33.143 lib/aux_model.rb