ecm_pictures2 5.0.1 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/ecm/pictures/picture.rb +2 -1
- data/config/locales/ecm.pictures.de.yml +9 -2
- data/config/locales/ecm.pictures.en.yml +1 -1
- data/config/routes.rb +2 -2
- data/db/migrate/001_create_ecm_pictures_picture_galleries.rb +1 -1
- data/db/migrate/002_create_ecm_pictures_pictures.rb +1 -1
- data/db/migrate/003_create_ecm_pictures_attached_pictures.rb +1 -1
- data/db/migrate/20160626141629_rename_ecm_pictures_picture_galleries_to_ecm_pictures_galleries.rb +1 -1
- data/db/migrate/20160626143414_rename_ecm_pictures_pictures_picture_gallery_id_to_gallery_id.rb +1 -1
- data/lib/ecm/pictures/configuration.rb +8 -0
- data/lib/ecm/pictures/version.rb +1 -1
- data/spec/factories/ecm/pictures/attached_pictures.rb +1 -1
- metadata +3 -4
- data/spec/factories/post.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9d2eb95b79a43b2c784d1296c5013cc9c4775a7e
|
4
|
+
data.tar.gz: a81d19f9a09e294d0015d74b343d4626176aafed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12f30ed06ed70686e7ac9ee6da41f11b7ad2a278f83604f32945a26bfefad9b4905894efa2dfd39a052a6f4811235ae11c3b150a4abfc13a1e356e838f1906ff
|
7
|
+
data.tar.gz: f8205fa0b4fd60bfc370f516882409e2ad0b51cd6968f725b6ea463104b1789138cdcf2790595637fe9858f9459a8127be8aae2425ac41dbf8c18b3e1e67baa5
|
@@ -2,7 +2,7 @@ module Ecm
|
|
2
2
|
module Pictures
|
3
3
|
class Picture < ActiveRecord::Base
|
4
4
|
# associations
|
5
|
-
belongs_to :gallery,
|
5
|
+
belongs_to :gallery, optional: true
|
6
6
|
has_many :attached_pictures, foreign_key: 'ecm_pictures_picture_id'
|
7
7
|
|
8
8
|
# acts as list
|
@@ -28,6 +28,7 @@ module Ecm
|
|
28
28
|
|
29
29
|
# validations
|
30
30
|
validates :image, attachment_presence: true
|
31
|
+
validates_attachment :image, size: { in: 0..Ecm::Pictures.maximum_image_file_size } unless Ecm::Pictures.maximum_image_file_size.nil?
|
31
32
|
# validates_attachment_presence :image
|
32
33
|
validates_attachment :image, content_type: { content_type: /\Aimage\/.*\Z/ }
|
33
34
|
|
@@ -26,6 +26,13 @@ de:
|
|
26
26
|
actions:
|
27
27
|
back: 'Zurück'
|
28
28
|
routes:
|
29
|
-
|
29
|
+
ecm_picture_engine: bilder
|
30
30
|
galleries: galerien
|
31
|
-
pictures: bilder
|
31
|
+
pictures: bilder
|
32
|
+
activerecord:
|
33
|
+
errors:
|
34
|
+
models:
|
35
|
+
ecm/pictures/picture:
|
36
|
+
attributes:
|
37
|
+
image_file_size:
|
38
|
+
in_between: Die Dateigröße überschreitet das maximum von 1 Megabyte.
|
data/config/routes.rb
CHANGED
data/db/migrate/20160626141629_rename_ecm_pictures_picture_galleries_to_ecm_pictures_galleries.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
class RenameEcmPicturesPictureGalleriesToEcmPicturesGalleries < ActiveRecord::Migration
|
1
|
+
class RenameEcmPicturesPictureGalleriesToEcmPicturesGalleries < ActiveRecord::Migration[4.2]
|
2
2
|
def change
|
3
3
|
rename_table :ecm_pictures_picture_galleries, :ecm_pictures_galleries
|
4
4
|
end
|
data/lib/ecm/pictures/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ecm_pictures2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0
|
4
|
+
version: 5.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -397,7 +397,6 @@ files:
|
|
397
397
|
- spec/factories/ecm/pictures/attached_pictures.rb
|
398
398
|
- spec/factories/ecm/pictures/galleries.rb
|
399
399
|
- spec/factories/ecm/pictures/pictures.rb
|
400
|
-
- spec/factories/post.rb
|
401
400
|
- spec/files/ecm/pictures/picture/image.jpg
|
402
401
|
homepage: https://github.com/robotex82/ecm_pictures
|
403
402
|
licenses: []
|
@@ -418,7 +417,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
418
417
|
version: '0'
|
419
418
|
requirements: []
|
420
419
|
rubyforge_project:
|
421
|
-
rubygems_version: 2.6.
|
420
|
+
rubygems_version: 2.6.11
|
422
421
|
signing_key:
|
423
422
|
specification_version: 4
|
424
423
|
summary: ECM Picture galleries module for ruby on rails.
|