Sha256: 468709a92b50e5d4ac3134b2df3f8d2ce441e9e0fcc8a30b61d2f4201b8b005b

Contents?: true

Size: 319 Bytes

Versions: 25

Compression:

Stored size: 319 Bytes

Contents

class Test
  include Mongoid::Document
  include SimpleFormAttachments::HasAttachments

  has_many_attachments :attachment_images, class_name: 'AttachmentImage', order: -> { attachment_images.id }
  validates :attachment_images, length: { maximum: 2 }

  # p attachment_images

  # sort_by { |u| ids.index(u.id) }

end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
simple_form_attachments-1.1.1 test/dummy/app/models/test.rb
simple_form_attachments-1.1.0 test/dummy/app/models/test.rb
simple_form_attachments-1.0.1 test/dummy/app/models/test.rb
simple_form_attachments-1.0.0 test/dummy/app/models/test.rb
simple_form_attachments-0.2.6 test/dummy/app/models/test.rb
simple_form_attachments-0.2.5 test/dummy/app/models/test.rb
simple_form_attachments-0.2.4 test/dummy/app/models/test.rb
simple_form_attachments-0.2.3 test/dummy/app/models/test.rb
simple_form_attachments-0.2.2 test/dummy/app/models/test.rb
simple_form_attachments-0.2.1 test/dummy/app/models/test.rb
simple_form_attachments-0.2.0 test/dummy/app/models/test.rb
simple_form_attachments-0.1.5 test/dummy/app/models/test.rb
simple_form_attachments-0.1.4 test/dummy/app/models/test.rb
simple_form_attachments-0.1.3 test/dummy/app/models/test.rb
simple_form_attachments-0.1.2 test/dummy/app/models/test.rb
simple_form_attachments-0.1.1 test/dummy/app/models/test.rb
simple_form_attachments-0.1.0 test/dummy/app/models/test.rb
simple_form_attachments-0.0.9 test/dummy/app/models/test.rb
simple_form_attachments-0.0.8 test/dummy/app/models/test.rb
simple_form_attachments-0.0.7 test/dummy/app/models/test.rb