polivalente 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 519abbcde73a8cc71755ca276ed90162cf9765e208ad35e056eb1d683b6d9f81
4
- data.tar.gz: e53d67eea6a037523611c684abd49239cf032b5a52a772f6698b24d419f7b4cf
3
+ metadata.gz: 015f16377d9116c4e41fe6d31635e530e416f0edd53fcb123310e2d18281585b
4
+ data.tar.gz: a2fdd33dbd1d15c85421636bc3578bb9cc0afab4f82db7a310e4025bc2d95fff
5
5
  SHA512:
6
- metadata.gz: 4d65b2d3c25b08c0d15b12e39ad22a17d8ba978a22803a2d3f202c5f6e5ffb784d6dd47ef91980ce788746fcf7c2c9172721ffbab3794171c391fc223e77ecd2
7
- data.tar.gz: c76affedd778732bef995a0ea986c35bbbb934c5e186d08af8b0b90b9cef24a8606d2eaa92ebba3b325399eb7d34117b98f8810e38c2cf940dc346b3df1b081a
6
+ metadata.gz: 00060c4ab19051dc3ca5202ee0c6827e496feb010c0e4495de51bef8fb0b4c37b9a5d5f91c3fd0935c759ae52b5a32a8a508e11cd8299f2c49b87834cd43410a
7
+ data.tar.gz: 98a4ac7172c92736199b6036a2c302eac0be2bc18a531ee2500e7dbbd4847d2f8fbbe28db7eeb557d78e5f3ac3dfeba481634c6e8fb244a35162622f5a7ed6b6
@@ -3,7 +3,7 @@ module Polivalente
3
3
  extend ActiveSupport::Concern
4
4
 
5
5
  included do
6
- has_many :archives, as: :archivable, dependent: :destroy
6
+ has_many :archives, as: :archivable, dependent: :destroy, class_name: "Polivalente::Archive"
7
7
  end
8
8
  end
9
9
  end
@@ -26,7 +26,11 @@ module Polivalente
26
26
 
27
27
  def tag_list=(names)
28
28
  self.tags = names.split(",").map do |name|
29
- Tag.where(name: name).first_or_create!
29
+ name.strip!
30
+ tag = name.downcase
31
+ tag = name.delete_prefix("#")
32
+
33
+ Tag.where(name: tag).first_or_create! if tag.length >= 3
30
34
  end.compact
31
35
  end
32
36
  end
@@ -1,3 +1,3 @@
1
1
  module Polivalente
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polivalente
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leo Neto
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-15 00:00:00.000000000 Z
11
+ date: 2022-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails