ish_models 0.0.33.137 → 0.0.33.138

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gallery.rb +4 -3
  3. data/lib/report.rb +2 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b90fe8d9b148631d369ef4f8d6ef435b983784a0fb520654544f2b51bf52cdb2
4
- data.tar.gz: b3f626ccae620eebf147f8edeff38ee84074fd672c37bd030a9712cca5aea437
3
+ metadata.gz: fae967dffb3be2dfc17016af14b8b86e7f3c15e71c042ef6616c03fa7fc1a823
4
+ data.tar.gz: d4f56b950da547e32832d92c5366bdb352ce88930359253077d7cde3bcc8bd4d
5
5
  SHA512:
6
- metadata.gz: d2163cae83c7270a83106f36730e52518a4cf7fa384f67f5fde60b1fd5f90b4c781a506cac1050fcbec1cd399ccb9e909dac700d2235bd3b0714dd3016543456
7
- data.tar.gz: 1584fb6192513d6531f479b6eafbc1c4695d213ca66f9d8c1de0e4ea10e3c050e6e4ecc74667157e61564c0b346e31d264d38ee5eb9a8b9e192a72d28ba7e6ca
6
+ metadata.gz: 5c93000c2c58774c2c29e1eef2e7d835778ffe13c9d75e5c1bf1536db481500e315e1975a8c73449da96f933751ff8e3b5d8ae35d07d74f4626084eec745a527
7
+ data.tar.gz: 15f58894be9232aa874a06b1f62eecb53a8d0edb1da34360f63f98d9e100e0a2fefec36092d3b15de32142ce06ddd13d2f2500193ebed8d2595af5446b413790
data/lib/gallery.rb CHANGED
@@ -25,9 +25,9 @@ class Gallery
25
25
 
26
26
  field :x, :type => Float
27
27
  field :y, :type => Float
28
- field :subhead, :type => String
29
- field :descr, :type => String, :as => :description
30
- field :lang, :type => String, :default => 'en'
28
+ field :subhead
29
+ field :descr, :as => :description
30
+ field :lang, :default => 'en'
31
31
  field :issue
32
32
  field :username
33
33
 
@@ -35,6 +35,7 @@ class Gallery
35
35
  field :slug
36
36
  index({ :slug => -1 }, { :unique => true })
37
37
  validates :slug, presence: true, uniqueness: true
38
+ before_validation :set_slug, :on => :create
38
39
 
39
40
  ## @TODO: I should have a redirect service, instead of this specific thing. But only after making $50.
40
41
  # embeds_many :gallery_names, :class_name => '::Ish::GalleryName'
data/lib/report.rb CHANGED
@@ -11,6 +11,7 @@ class Report
11
11
  field :slug
12
12
  validates :slug, :uniqueness => true, :presence => true
13
13
  index({ :slug => 1 }, { :unique => true })
14
+ before_validation :set_slug, :on => :create
14
15
 
15
16
  ## Can be one of: default (nil), longscroll
16
17
  field :item_type, type: String
@@ -97,7 +98,7 @@ class Report
97
98
  end
98
99
  end
99
100
 
100
- before_validation :set_slug, :on => :create
101
+
101
102
 
102
103
  set_callback :update, :after do |doc|
103
104
  Site.update_all updated_at: Time.now
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ish_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33.137
4
+ version: 0.0.33.138
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox